微信小程序tabBar

mac2022-06-30  143

在根目录的app.json中添加tabBar,示例如下

{ "pages": [ "pages/index/index", "pages/logs/logs", "pages/scanning/scanning" ], "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "WeChat", "navigationBarTextStyle": "black" }, "tabBar": { "color": "#a9b7b7", "selectedColor": "#11cd6e", "borderStyle": "white", "list": [ { "selectedIconPath": "images/11.png", "iconPath": "images/11.png", "pagePath": "pages/index/index", "text": "首页" }, { "selectedIconPath": "images/11.png", "iconPath": "images/11.png", "pagePath": "pages/logs/logs", "text": "日志" } ] } }

注:在小程序中,最后一个括号后面不能带’,’,否则会出现编译错误

转载于:https://www.cnblogs.com/HeJD/p/8702028.html

相关资源:如何自定义微信小程序tabbar上边框的颜色
最新回复(0)