微信小程序底部导航栏tabBar细节

"tabBar": {
"color": "#999999",
"selectedColor": "#FFEB60",
"borderStyle": "white",
"backgroundColor": "#fff",
"list": [
{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "images/icon_home.png",
"selectedIconPath": "images/icon_home_active.png"
},
{
"text": "商家",
"pagePath": "pages/merchant/merchant-entry/merchant-entry",
"iconPath": "images/icon_add.png",
"selectedIconPath": "images/icon_add.png"
},
{
"text": "消息",
"pagePath": "pages/user/information/information",
"iconPath": "images/icon_order.png",
"selectedIconPath": "images/icon_order_active.png"
},
{
"text": "我的",
"pagePath": "pages/user/user",
"iconPath": "images/icon_user.png",
"selectedIconPath": "images/icon_user_active.png"
}
]
},


上面是代码,tabar相关属性

属性类型必填默认值描述
colorHexColor tab 上的文字默认颜色
selectedColorHexColor tab 上的文字选中时的颜色
backgroundColorHexColor tab 的背景色
borderStyleStringblacktabbar上边框的颜色, 仅支持 black/white
listArray tab 的列表,详见 list 属性说明,最少2个、最多5个 tab
positionStringbottom可选值 bottom、top

tabBar list定义说明:

属性类型必填说明
pagePathString页面路径,必须在 pages 中先定义
textStringtab 上按钮文字
iconPathString图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px
selectedIconPathString选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px

tabBar 是一个数组,能配置最少2个、最多5个 tab



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值