1.全局配置文件
导航栏区域和背景区域由window配置
2.window
"window":{
"backgroundTextStyle":"dark",
"navigationBarBackgroundColor": "#2b4b6b",
"navigationBarTitleText": "陌上花开",
"navigationBarTextStyle":"white",
"enablePullDownRefresh": true,
"backgroundColor": "#efefef",
"onReachBottomDistance": 50
},
3.tabBar
"tabBar": {
"list": [{
"pagePath": "pages/home/home",
"text": "首页",
"iconPath": "/pages/image/1.png",
"selectedIconPath": "/pages/image/1-active.png"
},
{"pagePath": "pages/message/message",
"text": "消息",
"iconPath": "/pages/image/2.png",
"selectedIconPath": "/pages/image/2-active.png"
},{"pagePath": "pages/contact/contact",
"text": "联系",
"iconPath": "/pages/image/3.png",
"selectedIconPath": "/pages/image/3-active.png"
}]
},
4.页面配置
和全局app.json配置方式相同,只是页面配置会覆盖全局配置(text.json),其中比较重要的就是下拉刷新,一般不用在app.json里面配置,而是具体页面需要再配置