app.json配置文件
"tabBar": {
"color": "#515151",
"selectedColor": "#42bd56",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "images/shouye.png",
"selectedIconPath": "images/shouye_selected.png"
},
{
"pagePath": "pages/personal/personal",
"text": "个人",
"iconPath": "images/wode.png",
"selectedIconPath": "images/wode_selected.png"
}
]
},
Tabbar属性解释
color 未选择时 底部导航文字的颜色
selectedColor 选择时 底部导航文字的颜色
borderStyle 底部导航边框的样色(只能白色和黑色)
list 导航配置数组
selectedIconPath 选中时 图标路径
iconPath 未选择时 图标路径
pagePath 选中时页面访问地址
text 导航图标下方文字Tabbar