【前端】uni-app隐藏H5的头部导航栏page-head
uni-app 默认带一个导航栏
1.如果所有页面都不需要这个导航栏了,可以在App.vue的公共样式代码中添加
/* #ifdef H5 */
uni-page-head { display: none; }
/* #endif */
2.如果只是当前页面不需要,可以在pages.json中添加代码
"navigationStyle":"custom"
"pages": [{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
"enablePullDownRefresh": false,
//隐藏导航
"navigationStyle": "custom"
}
}],
将navigationStyle设置为custom是指自定义导航栏,系统会关闭默认的原生导航栏