在app.json
color:文字颜色
selectedColor:选中颜色
backgroundColor:背景颜色
pagePath:链接页面路径位置
text:文字
iconPath:图标
selectedIconPath:选中后图标
"tabBar":{
"color": "#CEF6EC",
"selectedColor": "#74DF00",
"backgroundColor": "#000000",
"list":[
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath":"images/category-1.png",
"selectedIconPath":"images/category-2.png"
},
{
"pagePath": "pages/products/products",
"text": "产品",
"iconPath":"images/category-3.png",
"selectedIconPath":"images/category-2.png"
},{
"pagePath": "pages/news/news",
"text": "动态",
"iconPath":"images/category-4.png",
"selectedIconPath":"images/category-2.png"
}
]
},
官方文档:
https://developers.weixin.qq.com/miniprogram/dev/framework/ability/custom-tabbar.html