微信小程序 tabBar
程序员文章站
2024-02-16 23:18:40
...
很简单,参考API: https://mp.weixin.qq.com/debug/wxadoc/dev/framework/MINA.html?t=20161107
在app.json里填写:tab个数范围2-5个
"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"
}
]
}
另外貌似不支持网络获取图片
点击后对应页面根据需要自行添加编写即可
上一篇: HTML5绘制圆弧的代码教程
下一篇: 【统计学习方法】||5决策树