首页设置隐藏tabBar
code
index.vue
onShow() {
uni.hideTabBar({
success: (res) => {
console.log('hideTabBar-success',res)
},
fail: (err) => {
console.log('hideTabBar-fail',err)
}
});
},
onHide() {
uni.showTabBar({
success: (res) => {
console.log('showTabBar-success',res)
},
fail: (err) => {
console.log('showTabBar-fail',err)
}
});
}
pages.js
"pages": [
// 第一项
{
"path": "pages/tabBar/index",
"style": {
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/tabBar/my",
"style": {
"navigationBarTitleText": "我的"
}
}
],
"tabBar": {
"color": "#999",
"selectedColor": "#dec17c",
"borderStyle": "black",
"backgroundColor": "#393939",
"list": [
{
"pagePath": "pages/cartoon/cartoon",
"iconPath": "static/icon/mall.png",
"selectedIconPath": "static/icon/mall_checked.png",
"text": "首页"
},
{
"pagePath": "pages/user/user",
"iconPath": "static/icon/about_me.png",
"selectedIconPath": "static/icon/about_me_checked.png",
"text": "我的"
}
]
},
页面
youngswelli (作者)
对,2.1.4左右的版本没这问题
2019-08-27 09:03