第一步:导入图片放入对应的目录项目图片不能直接放入编译器中,只能复制在文件中
第二部在app.json中配置
,
"tabBar": {
"color": "#666666",
"selectedColor": "#06bd04",
"list": [
{
"pagePath": "pages/index/index", //这个是你想展示在那个页面
"text": "首页",
"iconPath": "pages/images/bt.png", //图片路径
"selectedIconPath": "pages/images/bt.png"//图片路径
},
{
"pagePath": "pages/index/index",
"text": "图片展示",
"iconPath": "pages/images/bt.png",
"selectedIconPath": "pages/images/bt.png"
}
]
}