1.app.json中配置【全局配置】
1>pages页面配置
"pages": [
"pages/index/index",
"pages/list/list",
"pages/goods/goods",
"pages/my/my",
"pages/logs/logs"
],
- 谁在第一个,则默认显示谁
- 直接写,不用自己配置,保存时,系统会自动配置创建好文件
2> 窗口样式信息配置
"window": {
"navigationBarTextStyle": "black", // 导航栏标题、状态栏颜色,仅支持 black / white【头部文字颜色】
"navigationBarTitleText": "微信", // 导航栏标题文字内容【标题文字】
"navigationBarBackgroundColor": "#00ff00", // 导航栏背景颜色 【头部背景颜色】
"backgroundTextStyle":"light", // 下拉 loading 的样式,仅支持 dark / light【下拉小圆圈样式】
"enablePullDownRefresh":true, // 是否开启全局的下拉刷新。【想要下拉功能必须写true】
"backgroundColor":"#0000ff" //窗口的背景色 【下拉下来的背景颜色】
"onReachBottomDistance":50 //页面上拉触底事件触发时距页面底部距离,单位为 px。【不用写单位】
},
3>设置tabBar
"tabBar": {
"color": "#000000", //tab 上的文字默认颜色,仅支持十六进制颜色【tabBar的文字颜色】
"selectedColor": "#00ff00",//ab 上的文字选中时的颜色,仅支持十六进制颜色【选中的文字颜色】
"borderStyle": "black", //tabbar 上边框的颜色, 仅支持 black / white 【tabBar上的那一条线】
"position": "bottom", //tabBar 的位置,仅支持 bottom / top
"list": [ /// tab 的列表,最少 2 个、最多 5 个 tab 【tabBar的配置信息】
{
"pagePath": "pages/index/index", // 【path路径】
"text": "首页", // 【标题】
"iconPath": "./images/shouye.png", // 【小图标】
"selectedIconPath": "./images/shouye2.png"//【选中时的小图标】
}, {
"pagePath": "pages/list/list",
"text": "列表",
"iconPath": "./images/fenlei.png",
"selectedIconPath": "./images/fenlei2.png"
}, {
"pagePath": "pages/goods/goods",
"text": "商品",
"iconPath": "./images/shangpin.png",
"selectedIconPath": "./images/shangpin2.png"
}, {
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "./images/wodedangxuan.png",
"selectedIconPath": "./images/wodedangxuan2.png"
}
]
},

被折叠的 条评论
为什么被折叠?



