页面.json用来对本页面的窗口表现进行配置。
它只能针对window配置,并且会覆盖 app.json 的 window 中相同的配置项。
1 { 2 3 /** 4 * 以下是页面顶部导航栏设置 5 **/ 6 "navigationBarBackgroundColor" : "[Color]", // 导航栏背景颜色,默认值:#000000 7 "navigationBarTextStyle" : "white|black", // 导航栏标题颜色,默认值white 8 "navigationBarTitleText": "[String]" , // 导航栏标题文字内容 9 10 /** 11 * 以下是下拉刷新或上拉触底设置 12 **/ 13 "backgroundColor" : "[Color]", // 窗口的背景色 14 "backgroundTextStyle" : "dark|light", // 下拉 loading 的样式,默认值dark(暗) 15 "enablePullDownRefresh" : true|false, // 是否全局开启下拉刷新,值 true | false 16 "onReachBottomDistance" : [Number], // 页面上拉触底事件触发时距页面底部距离,单位为px,默认值 50 17 "disableScroll" : true|false // 设置为 true 则页面整体不能上下滚动;只在页面配置中有效,无法在 app.json 中设置该项 18 19 /** 20 * usingComponents 定义自定义组件(仅在本页面中可用) 21 **/ 22 "usingComponents": { 23 "component-tag-name": "component-path", // 格式:组件标签名称 : 自定义组件路径 24 // 可定义多个自定义组件 25 } 26 27 }