uniapp 小程序怎么取消默认导航栏
很多教程都说在page.json的path下设置
"app-plus":{
"titleNView": false
}
只这样设置是没有效果的,还得在globalStyle加一句
"globalStyle": {
"navigationBarTextStyle": "#FFF",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#000",
"backgroundColor": "#000",
"navigationStyle" : "custom"
}
最下面的这个参数才是关键
"navigationStyle" : "custom"
文档:
navigationStyle String default 导航栏样式,仅支持 default/custom。custom即取消默认的原生导航栏,需看使用注意 微信小程序 7.0+、百度小程序、H5、App(2.0.3+)
https://uniapp.dcloud.io/collocation/pages?id=app-titlenview
还没有任何评论,你来说两句吧