uniapp——原生导航栏

 1.禁用原生导航栏,APP、h5和微信小程序禁用的方法不一样哦,在page.json中配置如下:

{
            "path": "pages/index/index",
            "style": {
                "navigationBarTitleText": "首页",
                "navigationStyle": "custom",//禁用原生导航栏(微信小程序)
                "app-plus":{
                    "titleNView":false //禁用原生导航栏(h5和APP)
                }
            }
        },

 2.修改某个页面导航栏颜色,在page.json中配置如下:

{
            "path":"pages/me/meInfo",
            "style":{
                "navigationBarTitleText":"我的账号",
                "navigationBarTextStyle" : "white",
                "navigationBarBackgroundColor" : "#ffd655"
            }
        },

原理就是把globalStyle中的样式拿过来复写样式

原文地址:https://www.cnblogs.com/cqiong/p/14718255.html