uniapp取消原生導(dǎo)航欄的方法:1、在【pages.json】里配置【navigationStyle:custom】;2、代碼設(shè)置【"navigationStyle":"custom","app-plus":{"titleNView"】。
本教程操作環(huán)境:windows7系統(tǒng)、uni-app2.5.1版本,該方法適用于所有品牌電腦。
推薦(免費(fèi)):uni-app開發(fā)教程
uniapp取消原生導(dǎo)航欄的方法:
1、取消uni-app原生頭部導(dǎo)航欄(全局取消)
所有頁面都去掉:在pages.json里配置navigationStyle:custom =>網(wǎng)址 https://uniapp.dcloud.io/collocation/pages?id=globalstyle
2、單頁面取消
新版小程序支持page->style配置navigationStyle為custom =>網(wǎng)址 https://uniapp.dcloud.io/collocation/pages?id=style
app和h5配置titleNView為false =>網(wǎng)址 https://uniapp.dcloud.io/collocation/pages?id=app-plus
另外可以參考hello uni-app里的自定義導(dǎo)航欄示例(注意頂部導(dǎo)航欄占位)
如:
{ “page”:"pages/index/index", "style":{ "navigationStyle":"custom", "app-plus":{ "titleNView":false } } }