问题描述
使用自定义导航栏,在page.json页面用height为0的方式隐藏原生底部tabbar,但真机调试时会显示出空白的tabbar,如图:
浏览器中:
真机调试:
隐藏原生tabbar方式(page.json):
"tabBar": {
"custom": true,
"color": "#7A7E83",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"height": "0",
"fontSize": "15px",
"list": [{
"pagePath": "pages/FirstPage/FirstPage",
"text": ""
},
{
"pagePath": "pages/To-DoList/To-DoList",
"text": ""
},
{
"pagePath": "pages/Gallery/Gallery",
"text": ""
},
{
"pagePath": "pages/Mine/Mine",
"text": ""
}
]
},
问题解决:
在自定义导航栏页面,页面开始时使用uniapp原生方法:uni.hideTabBar()
created() {
uni.hideTabBar()
}