[微信小程序開發]如何去掉或隱藏小程序頂部欄navigationBar
阿新 • • 發佈:2018-08-02
enable text tle refresh pre logs ech spa scroll
小程序全局配置app.json增加選項:"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 } } }
[微信小程序開發]如何去掉或隱藏小程序頂部欄navigationBar