1.确认你的 app.json下的"pages"对象中 第一个page是你的 tabbar中list集合的第一个page
如:
"pages":[
"pages/shouye/shouye",
"pages/mainpage/mainpage",
"pages/fund/fund",
"pages/zichan/zichan",
"pages/mine/mine"
],
=======================================
"list": [{
"pagePath": "pages/shouye/shouye",
"text": "首页",
"iconPath": "pages/image/home_off.png",
"selectedIconPath": "pages/image/home_on.png"
},...]
2.确认你的tabbar设置了这几个不可以少的属性
"pagePath": "pages/shouye/shouye",
"text": "首页",
"iconPath": "pages/image/home_off.png",
"selectedIconPath": "pages/image/home_on.png"
(我这里image建在pages文件夹下面,路径可能和你们不一样 ps:路径必须要对)
3.确认你的list集合长度不小于2且不大于5 (官方要求的)
时间: 2024-10-24 16:05:56