在pages.json设置
"tabBar": {
"color": "#8a8a8a",
"selectedColor": "#8bbce1",
"list": [{
"pagePath": "pages/homePage/homePage",
"iconPath": "static/img/tabbar/homePage.png",
"selectedIconPath": "static/img/tabbar/selHomePage.png",
"text": "首页"
},
{
"pagePath": "pages/other/other",
"iconPath": "static/img/tabbar/homePage.png",
"selectedIconPath": "static/img/tabbar/selHomePage.png",
"text": "其他"
}
]
},
只是需要两个才可以,否则会报错