tabBar不显示?

发布于 6 年前作者 zgao10269 次浏览最后编辑 6 年前来自 issues

在任何机型中,包括真机中都不显示,直接附上 app.json 的 代码

{
  "pages": [
    "pages/index/index",
    "pages/logs/logs"
  ],
  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#FFFAFA",
    "navigationBarTitleText": "Allen",
    "navigationBarTextStyle": "black"
  },
  "tabBar": {
    "color": "#000000",
    "selectedColor": "#CD5C5C",
    "backgroundColor": "#FAF0E6",
    "position": "bottom",
    "list": [
      {
        "pagePath": "pages/logs/logs",
        "text": "bye",
        "iconPath": "icons/caihong.png",
        "selectedIconPath": "icons/caihong.png"
      },
      {
        "pagePath": "pages/logs/logs",
        "text": "my",
        "iconPath": "icons/shuilao.png",
        "selectedIconPath": "icons/shuilao.png"
      }
    ]
  }
}
5 回复
xiuyingpeng
xiuyingpeng1 楼6 年前

谢谢大家的回复,第一次提问题,真的没有想到这么快就有人耐心解答,今天有幸到微信,这里感谢微信总部的开发小哥一眼看出我的问题,问题在于 pages 中两个界面的顺序,直接加载的是pages/index/index 界面 ,但 tabBar 的 list 中两个元素的 pagePath 都是 pages/logs/logs,所以,直接加载 pages/index/index ,tabBar自然不会显示。

chaofan
chaofan2 楼6 年前

代码片段

gujun
gujun3 楼6 年前

贴个代码块链接…可以帮你测试一下.

daijing
daijing4 楼6 年前

改了后就好了?

yong47
yong475 楼4 年前

看报错