简介

本节主要介绍微信小程序底部导航栏tabBar的配置。

  "tabBar": {
    "selectedColor": "#1296db",
    "list": [
      {
        "pagePath": "page/index",
        "text": "首页",
        "iconPath": "image/icon-homepage.png",
        "selectedIconPath": "image/icon-homepage-s.png"
      },
      {
        "pagePath": "page/me/me",
        "text": "我的",
        "iconPath": "image/icon-me.png",
        "selectedIconPath": "image/icon-me-s.png"
      },
      {
        "pagePath": "page/more/more",
        "text": "更多",
        "iconPath": "image/icon-more.png",
        "selectedIconPath": "image/icon-more-s.png"
      }
    ]
  }

注意事项

第一个pagePath一定要是index页,image路径要存在,否则编译不过。

参考