[微信小程序开发]如何去掉或隐藏小程序顶部栏navigationBar

时间:2018-07-19 21:01:27   收藏:0   阅读:1625

解决办法:

小程序全局配置app.josn增加选项:"navigationStyle": "custom",

~

具体如下:

原生小程序开发>

打开 app.json:

{
    "pages": [
        "pages/index/index",
        "pages/logs/index"
    ],
    "window": {
        "backgroundTextStyle": "light",
        "navigationBarBackgroundColor": "#000",
        "navigationStyle": "custom",
        "navigationBarTitleText": "WeChat"
    }
}

 

mpvue方式开发小程序>

打开 /src/main.js:

export default {
  config: {
    pages: [
      ‘pages/logs/main‘,
      ‘^pages/index/main‘
  ], window: { backgroundTextStyle: ‘light‘, navigationBarBackgroundColor: ‘#666‘, navigationStyle: ‘custom‘, navigationBarTitleText: ‘WeChat‘, navigationBarTextStyle: ‘#fff‘, enablePullDownRefresh: false, disableScroll: true } } }

 

本文地址:https://www.cnblogs.com/rapale/p/9337781.html  

  

  

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!