微信小程序tabBar配置方法和参数介绍

追格官方小助手/ 2022年05月29日/ 小程序/ 浏览 2073

微信小程序是一个多 tab 应用(就是说底部菜单或顶部有 tab 栏可以切换页面),可以通过 tabBar 配置项指定 tab 栏的表现,以及 tab 切换时显示的对应页面,如:


color:tab 上的文字默认颜色


selectedColor:tab 上的文字选中时的颜色


backgroundColor:tab 的背景色


borderStyle:tabbar 上边框的颜色, 仅支持 black / white


list:tab的列表,不能少于 2 个、不能多于 5 个 tab


position:tabBar 的位置,仅支持 bottom / top


custom:自定义 tabBar


参考文档:

https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#tabBar

发表评论

暂无评论,抢个沙发...

客服 工单