一.在app.json配置文件
1."pages":[]存放项目文件的路由
2."window":{}头部配置
"backgroundTextStyle": "light", 背景文字
"navigationBarBackgroundColor": "#fff", 导航栏背景颜色
"navigationBarTitleText": "小程序", 导航栏标题
"navigationBarTextStyle": "white" 导航栏文字颜色
3."tabBar":{} 底部配置
"tabBar": {
"custom": true,
"color": "#000000",
"selectedColor": "#000000",
"backgroundColor": "#000000",
"list": [
{
"text": "首页",
"pagePath": "pages/home/index"
},
]
}
二.页面.json
"usingComponents": {} 使用组件
"navigationBarTitleText": 当前页面标题
"enablePullDownRefresh": true 下拉刷新
"backgroundColor": "#eee" 背景颜色
"backgroundTextStyle": "dark"背景文字颜色
"backgroundTextStyle": "dark" dark | light下拉 loading 的样式,
"onReachBottomDistance": 100,页面上拉触底事件触发时距页面底部距离,单位为px。