1.在app.json中设置"tabBar":{}
2.tabBar的属性有
3.其中list为导航栏的设置,它的属性为
4.下面是例子:
效果
代码:
“tabBar”:{
“list”: [
{
“iconPath”:"/image/12.png",
“pagePath”: “pages/index/index”,
“selectedIconPath”:"/image/11.png",
“text”: “微信”
},
{
“iconPath”:"/image/32.png",
“pagePath” : “pages/text1/text1”,
“selectedIconPath”:"/image/31.png",
“text”: “通讯录”
},
{
“iconPath”:"/image/22.png",
“pagePath” : “pages/text2/text2”,
“selectedIconPath”:"/image/21.png",
“text”: “我的”
}
]
}