多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
### window 用于设置小程序的状态栏、导航条、标题、窗口背景色。 | 属性 | 类型 | 默认值 | 描述 | 最低版本 | | ---------------------------- | -------- | ------- | ---------------------------------------- | ---------- | | navigationBarBackgroundColor | HexColor | #000000 | 导航栏背景颜色,如"#000000" | | | navigationBarTextStyle | String | white | 导航栏标题颜色,仅支持 black/white | | | navigationBarTitleText | String | | 导航栏标题文字内容 | | | navigationStyle | String | default | 导航栏样式,仅支持 default/custom。custom 模式可自定义导航栏,只保留右上角胶囊状的按钮 | 微信版本 6.6.0 | | backgroundColor | HexColor | #ffffff | 窗口的背景色 | | | backgroundTextStyle | String | dark | 下拉背景字体、loading 图的样式,仅支持 dark/light | | | enablePullDownRefresh | Boolean | false | 是否开启下拉刷新,详见[页面相关事件处理函数](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/app-service/page.html#%E9%A1%B5%E9%9D%A2%E7%9B%B8%E5%85%B3%E4%BA%8B%E4%BB%B6%E5%A4%84%E7%90%86%E5%87%BD%E6%95%B0) | | | onReachBottomDistance | Number | 50 | 页面上拉触底事件触发时距页面底部距离,单位为px | | **注:HexColor(十六进制颜色值),如"#ff00ff"** **注:navigationStyle 开启 custom 后,低版本客户端需要做好兼容。开发者工具基础库版本切到 1.7.0(不代表最低版本,只供调试用) 可方便切到旧视觉** 如 : ```json { "window":{ "navigationBarBackgroundColor": "#666666", "navigationBarTextStyle": "white", "navigationBarTitleText": "页面测试", "navigationStyle": "default", "backgroundColor": "#ff0000", "backgroundTextStyle": "light", "enablePullDownRefresh": true, "onReachBottomDistance": 50 } } ``` :-: ![](http://xiaoyulive.oss-cn-beijing.aliyuncs.com/imgs/wechat/002.png)