您的位置:首页 > 移动开发 > 微信开发

小程序框架学习3——(page.json)

2018-02-01 23:02 549 查看
3、page.json

每一个小程序页面也可以使用.json文件来对本页面的窗口表现进行配置

页面的配置比app.json全局配置简单得多,只是设置 app.json 中的 window 配置项的内容

页面中配置项会覆盖 app.json 的 window 中相同的配置项

页面的.json只能设置 window 相关的配置项,以决定本页面的窗口表现,所以无需写 window 这个键

属性

属性类型默认值描述
navigationBarBackgroundColorHexColor#000000导航栏背景颜色,如"#000000"
navigationBarTextStyleStringwhite导航栏标题颜色,仅支持 black/white
navigationBarTitleTextString导航栏标题文字内容
backgroundColorHexColor#ffffff窗口的背景色
backgroundTextStyleStringdark下拉背景字体、loading 图的样式,仅支持 dark/light
enablePullDownRefreshBooleanfalse是否开启下拉刷新,详见页面相关事件处理函数
disableScrollBoolean
false设置为 true 则页面整体不能上下滚动;只在 page.json 中有效,无法在 app.json 中设置该项
onReachBottomDistanceNumber50页面上拉触底事件触发时距页面底部距离,单位为px
{

"navigationBarBackgroundColor": "#ffffff",

"navigationBarTextStyle": "black",

"navigationBarTitleText": "微信接口功能演示",

"backgroundColor": "#eeeeee",

"backgroundTextStyle": "light"

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  小程序 page.json