小程序自定义Tabbar控制Tabbar的数量

1、app.json文件配置

配置tabbar文件和vant-weapp组件的引用

"tabBar": {
    "custom": true,   //一定要加上这句话
    "color": "#989898",
    "selectedColor": "#1a76d7",
    "borderStyle": "white",
    "backgroundColor": "#fff",
    "list": [{
        "pagePath": "pages/index/index",
        "iconPath": "images/nav/home-off.png",
        "selectedIconPath": "images/nav/home-on.png",
        "text": "主页"
      },
      {
        "pagePath": "pages/my/my",
        "iconPath": "images/nav/my-off.png",
        "selectedIconPath": "images/nav/my-on.png",
        "text&#

你可能感兴趣的:(小程序,小程序,小程序自定义Tabbar,Tabbar的数量动态显示)