1、在app.json中配置
"sitemapLocation": "sitemap.json",
"tabBar": {
"color": "#a9b7b7",
"selectedColor": "#11cd6e",
"borderStyle": "white",
"list": [
{
"selectedIconPath": "images/home (1).png", //选中后的图标
"iconPath": "images/home.png",
"pagePath": "pages/index/index",
"text": "首页"
},
{
"selectedIconPath": "images/text (1).png",
"iconPath": "images/text.png",
"pagePath": "pages/components/editor/editor",
"text": "文本"
}]
}
这里的icon也可在iconfont库(https://www.iconfont.cn/)进行下载png图片
2、tabbar的其它配置可参照文档
https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBar.html