xiecheng328 / miniprogram

慕课网小程序云开发实战课资源库
153 stars 236 forks source link

tabBar字体颜色不生效问题 #2

Open KuMaMon2019s opened 4 years ago

KuMaMon2019s commented 4 years ago

教程中tabBar设置的字体颜色不太严谨,会出现字体颜色不生效。因此可以这样设置。

"tabBar":{
    "color": "#999",
    "selectedColor": "#b80105",
    "backgroundColor": "#ffffff",
    "position": "bottom",
    "borderStyle": "black",
    "list": [{
      "pagePath": "pages/playlist/playlist",
      "text":"音乐",
      "iconPath":"images/icons/yinyue.png",
      "selectedIconPath":"images/icons/s_yinyue.png"
    },
    {
      "pagePath": "pages/blog/blog",
      "text":"发布",
      "iconPath":"images/icons/fabu.png",
      "selectedIconPath":"images/icons/s_fabu.png"
    },
    {
      "pagePath": "pages/profile/profile",
      "text":"我的",
      "iconPath":"images/icons/wode.png",
      "selectedIconPath":"images/icons/s_wode.png"
    }
  ]
  },

主要问题在于 "color": "#999", "selectedColor": "#b80105", 需要设置个背景色做为遮罩,覆盖原有的样式 "backgroundColor": "#ffffff", "position": "bottom", "borderStyle": "black",