在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
在进行微信小程序开发的时候我们会经常遇到底部tab栏的操作,微信小程序官方也为我们提供了简单便捷的配置方法,举例出来供大家参考: 在全局的app.json页面中增加tabbar键值对:
代码如下: { "pages":[ "pages/index/index", "pages/cart/cart", "pages/user/user" ], "window":{ "backgroundTextStyle":"light", "navigationBarBackgroundColor": "#F58233", "navigationBarTitleText": "家居电商", "navigationBarTextStyle":"white" }, "tabBar": { "list": [{ "pagePath": "pages/index/index", "text": "推荐", "iconPath": "/images/No-orders.png", "selectedIconPath": "/images/fail.png" },{ "pagePath": "pages/cart/cart", "text": "购物车", "iconPath": "/images/[email protected]", "selectedIconPath": "/images/[email protected]" },{ "pagePath": "pages/user/user", "text": "我", "iconPath": "/images/defaultAvatar.png", "selectedIconPath": "/images/[email protected]" }] } }
简单的分享就到这里,如有疑问,欢迎留言~ |
请发表评论