1、在 pages.json 中为首页设置 tabBar
2、在 pages.json 第二个页面中设置 "background": "transparent"
{
"pages": [
{"path": "pages/index/index", "style": {"navigationBarTitleText": "uni-app"}},
{"path": "pages/index/a", "style": {"navigationBarTitleText": "uni-app - a", "background": "transparent"}},
{"path": "pages/index/b", "style": {"navigationBarTitleText": "uni-app - b"}},
{"path": "pages/index/c", "style": {"navigationBarTitleText": "uni-app - c"}}
],
"tabBar": {
"color": "#AAA",
"selectedColor": "#D50000",
"backgroundColor": "#FFF",
"borderStyle": "#DDDDDD",
"list": [
{"pagePath": "pages/index/index"}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
}
3、使用安卓手机进行运行调试
// 在首页中,点击跳转第二页面
// /pages/index/index.vue
uni.navigateTo({url: './a', animationType: 'fade-in'})
// 在第二个页面中,跳转第三页面
// /pages/index/a.vue
uni.navigateTo({url: './b', animationType: 'slide-in-right'})
// 在第三个页面中,跳转第四页面
// /pages/index/b.vue
uni.navigateTo({url: './c'})
4、点击导航了返回按钮返回上一页
5、此时便会出现第二个页面强制覆盖掉第三个页面的 bug