tabBar需要设置 app.json ,大小写敏感,例如 pagePath 写成 pagepath,则提示出错。

小程序学习:tabBar

以下为app.json 内容:

{
  "pages": [
    "pages/index/index",
    "pages/logs/logs",
    "pages/newpage/newpage"
  ],
  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#ffcc00",
    "navigationBarTitleText": "玄铁重剑",
    "navigationBarTextStyle": "black"
  },
  "tabBar": {
    "backgroundcolor": "#000",
    "list": [
      {
        "pagePath": "pages/index/index",
        "text": "您好"
      },
      {
        "pagePath": "pages/logs/logs",
        "text": "郭靖"
      },
      {
        "pagePath": "pages/newpage/newpage",
        "text": "杨过"
      }
    ]
  }
}

小程序学习:tabBar

 

 

 

相关文章:

  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
猜你喜欢
  • 2021-10-16
  • 2021-11-03
  • 2022-12-23
  • 2021-06-28
  • 2021-12-24
  • 2021-08-10
  • 2021-09-22
相关资源
相似解决方案