微信小程序开发

微信小程序设置tabBar选中颜色和图标

2020-05-27  本文已影响0人  kkkkkkee

{

  "pages":[

    "pages/index/index",

    "pages/logs/logs"

  ],

  "window":{

    "backgroundTextStyle":"light",

    "navigationBarBackgroundColor": "#000",

    "navigationBarTitleText": "首页",

    "navigationBarTextStyle":"white"//只能black和white

  },

  "tabBar": {

    "list": [

      {

        "pagePath": "pages/index/index",//跳转路径

        "selectedIconPath": "img/home2.png",//选中时候展示icon

        "iconPath": "img/home1.png",//默认展示icon

        "text": "首页"

      },

      {

        "pagePath": "pages/logs/logs",

        "selectedIconPath": "img/part2.png",

        "iconPath": "img/part1.png",

        "text": "分类"

      },

      {

        "pagePath": "pages/logs/logs",

        "selectedIconPath": "img/mine2.png",

        "iconPath": "img/mine1.png",

        "text": "我的"

      }

    ]

  },

  "style": "v2",

  "sitemapLocation": "sitemap.json"

}

上一篇下一篇

猜你喜欢

热点阅读