小程序模板網(wǎng)

微信小程序tabBar不生效

發(fā)布時間:2018-04-25 10:20 所屬欄目:小程序開發(fā)教程

配置如下:

 

				
  1. {
  2. "pages": [
  3. "pages/index/index",
  4. "pages/mine/mine"
  5. ],
  6. "window": {
  7. "backgroundTextStyle": "light",
  8. "navigationBarBackgroundColor": "#fff",
  9. "navigationBarTitleText": "活動寶",
  10. "navigationBarTextStyle": "black"
  11. },
  12. "tabBar": {
  13. "backgroundColor": "#202020",
  14. "color": "#fff",
  15. "list": [
  16. {
  17. "selectedIconPath": "images/ic_index2.png",
  18. "iconPath": "images/ic_index1.png",
  19. "text": "首頁",
  20. "backgroundColor": "#dddddd",
  21. "pagePath":"page/index/index"
  22. },
  23. {
  24. "selectedIconPath": "images/ic_mine2.png",
  25. "iconPath": "images/ic_mine1.png",
  26. "text": "我的",
  27. "backgroundColor": "#dddddd",
  28. "pagePath": "page/mine/mine"
  29. }
  30. ]
  31. }
  32. }

效果圖出不來的原因在于:  pagePath節(jié)點配置錯誤,但工具又沒有報錯。正確的應該為:

 

				
  1. "pagePath": "pages/mine/mine"


易優(yōu)小程序(企業(yè)版)+靈活api+前后代碼開源 碼云倉庫:starfork
本文地址:http://www.u-renovate.com/wxmini/doc/course/24017.html 復制鏈接 如需定制請聯(lián)系易優(yōu)客服咨詢:800182392 點擊咨詢
QQ在線咨詢