在app.json中添加 “tabBar”
//创建TabBar"tabBar": {"list": [{//跳转的路径"pagePath": "pages/home/home",//名称"text": "首页",//使用的图片"iconPath": "/static/rv_img1.jpg",//选中的图片"selectedIconPath": "/static/rv_img20.jpg"},{"pagePath": "pages/index/index","text": "我的","iconPath": "/static/rv_img2.jpg","selectedIconPath": "/static/rv_img20.jpg"}]}
效果图:
