1.list中的第一个tab的地址必须定义在pages 中
- "pages":[
- "pages/Intent/Intent",
- "pages/Services/Services",
- "pages/Profile/Profile"
- ],
2.list 中的 pagePath 必须是正确地址,如果出现不显示的问题,99%是因为地址不正确
- "selectedIconPath": "pages/Image/ic_tab_profile_select.png", #此处也错了,此处pages该有斜杠/
- "iconPath": "pages/Image/ic_tab_profile_normal.png",
- "pagePath": "/pages/Profile/Profile", #如此处错了pages前面不该有斜杠/
- "text": "我的"
正确写法为:
- "list": [{ "selectedIconPath": "/pages/Image/ic_tab_buycar_select.png",
- "iconPath": "/pages/Image/ic_tab_buycar_normal.png",
- "pagePath": "pages/Intent/Intent",
- "text": "购车"
- },
- ...
- ]
项目结构为