tabBar配置在全局配置文件app.json
中
tarBar配置代码如下:
"tabBar": {
"color": "#4C4D4F",
"selectedColor": "BDA066",
"list": [
{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "images/home.png",
"selectedIconPath": "images/home-fill.png"
},{
"text": "分类",
"pagePath": "pages/classify/classify",
"iconPath": "images/all.png",
"selectedIconPath": "images/all-fill.png"
},{
"text": "资讯",
"pagePath": "pages/news/news",
"iconPath": "images/news.png",
"selectedIconPath": "images/news-fill.png"
}
]
}
效果如下图所示: