很简单,参考API: https://mp.weixin.qq.com/debug/wxadoc/dev/framework/MINA.html?t=20161107
在app.json里填写:tab个数范围2-5个
[plain] view plain copy
-
"tabBar":{
-
"color": "#818181",
-
"selectedColor": "#0082D7",
-
"borderStyle": "white",
-
"list": [
-
{
-
"pagePath": "pages/index/index",
-
"text": "首页",
-
"iconPath":"res/images/tabar/index.png",
-
"selectedIconPath": "res/images/toobar/index01.png"
-
},
-
{
-
"pagePath": "pages/me/me",
-
"text": "个人中心",
-
"iconPath": "res/images/tabar/me.png",
-
"selectedIconPath": "res/images/toobar/me.png"
-
},
-
{
-
"pagePath": "pages/more/more",
-
"text": "更多",
-
"iconPath": "res/images/tabar/more.png",
-
"selectedIconPath": "res/images/toobar/more.png"
-
}
-
]
-
}
另外貌似不支持网络获取图片,点击后对应页面根据需要自行添加编写即可。
|