pages.json
"tabBar": {
"color": "#333333",
"selectedColor": "#286AFF",
"borderStyle": "#ebebeb",
"backgroundColor": "white",
"height": "50px",
"midButton": {
"backgroundImage": "/static/tabbar/mid-btn__icon1.gif",
"width": "55px",
"height": "55px"
},
"list": [
{
"pagePath": "pages/home/home",
"iconPath": "/static/tabbar/home.png",
"selectedIconPath": "/static/tabbar/home-selected.png",
"text": "首页",
"visible": false
},
{
"pagePath": "pages/water-rain/index",
"iconPath": "/static/tabbar/water-rain.png",
"selectedIconPath": "/static/tabbar/water-rain-selected.png",
"text": "服务",
"visible": false
},
{
"pagePath": "pages/workorder/index",
"iconPath": "/static/tabbar/workorder.png",
"selectedIconPath": "/static/tabbar/workorder-selected.png",
"text": "工单",
"visible": false
},
{
"pagePath": "pages/my/index",
"iconPath": "/static/tabbar/my.png",
"selectedIconPath": "/static/tabbar/my-selected.png",
"text": "我的"
}
]
}
2 个回复
x***@foxmail.com (作者)
自顶
爱豆豆 - 办法总比困难多
因为midButton是居中的 所以两边的tabbar数量必须相同才可以
即使你不用visible 当tabbar数量不能左右平均分配的时候 midButton 也是不会显示的