app.json
"pages":[
"pages/index/index",
"pages/logs/logs"
]
json中的字段pages是我们的页面,需要创建页面需要在这里注册,我们在这里定义好页面后,编译器,也会自动生成需要的文件 例:【xxx.js】【xxx.wxml】【xxx.wxss】【xxx.json】
下面是属性Window
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "Weixin",
"navigationBarTextStyle":"black"
}
属性 | 类型 | 默认值 | 描述 |
navigationBarBackgroundColor | HexColor | #000000 | 导航栏背景颜色,如"#000000" |
navigationBarTextStyle | String | white | 导航栏标题颜色,仅支持black/white |
navigationBarTitleText | String | null | 导航栏标题文字内容 |
backgroundColor | HexColor | #ffffff | 窗口的背景色 |
backgroundlextStyle | String | dark | 下拉背景字体、loading图的样式,仅支持 dark/light |
enablePulIDownRefresh | Boolean | false | 是否开启下拉刷新 |
onReachBottomDistance | Number | 50 | 页面上拉触底事件触发事件距页面底部距离,单位px |
APP.jason其他配置项列表
属性 | 类型 | 必填 | 描述 |
pages | StringArray | 是 | 设置页面路径 |
windows | Object | 否 | 设置默认页面的窗☐ 表现 |
tabar | Object | 否 | 设置底部tab的表现 |
networkTimeout | Object | 否 | 设置网络超时时间 |
debug | Boolean | 否 | 设置是否开启 debug 模式 |