3***@qq.com
3***@qq.com
  • 发布:2018-08-23 16:00
  • 更新:2018-08-24 08:23
  • 阅读:17670

uin-app 怎么设置不显示标题栏

分类:uni-app

我要在标题栏的位置加一个搜索框怎么不显示标题栏

2018-08-23 16:00 负责人:无 分享
已邀请:
DCloud_heavensoft

DCloud_heavensoft

custom是全局的,配置后微信和app都是所有页面都没有原生头了。
如果只是app的首页不要原生标题栏,可以在pages.json里这样配:

"path": "pages/index/index", //首页  
"style": {  
    "app-plus": {  
        "titleNView": false //禁用原生导航栏  
    }  
}

参考http://uniapp.dcloud.io/collocation/pages?id=app-plus

dolphin的phin

dolphin的phin

{  
    "pages": [  
        {  
            "path": "pages/index/index",  
            "style": {  
                "navigationBarTextStyle": "light",  
                "app-plus": {  
                    "titleNView": false //打包app 要加上这个 禁用原生导航栏  
                }  
            }  
        },{  
            "path": "pages/city/city",  
            "style": {  
                "navigationBarTitleText": "选择城市",  
                "enablePullDownRefresh": false  
            }  
        },{  
            "path": "pages/entry/login",  
            "style": {  
                "navigationBarTitleText": "登陆"  
            }  
        }  
    ],  
    "globalStyle": {  
        "navigationBarTextStyle": "black",  
        "navigationBarBackgroundColor": "#fff",  
        "backgroundColor": "#fbf9fe",  
        "navigationStyle": "custom",  
        "enablePullDownRefresh": true  
    }  
}  
dolphin的phin

dolphin的phin

"globalStyle": {  
     "navigationStyle": "custom"  // 开启这个  然后自己写一个head公共模块 切换的时候换掉头部  
}

该问题目前已经被锁定, 无法添加新回复