tabbar的颜色在安卓和IOS显示不一致

发布于 8 年前作者 xiuying146781 次浏览最后编辑 8 年前来自 ask

“tabBar”: {

    “color”: “#999999”,

    “selectedColor”: “#f85153”,

    “backgroundColor”: “white”,

    “borderStyle”: “black”,

    “position”: “bottom”,

    “list”: [

      {

        “pagePath”: “pages/index/index”,

        “iconPath”: “images/tab_index_unchecked@3x.png”,

        “selectedIconPath”: “images/tab_index_selected@3x.png”,

        “text”: “page1”

      },

      {

        “pagePath”: “pages/message/index”,

        “iconPath”: “images/tab_news_unchecked@3x.png”,

        “selectedIconPath”: “images/tab_news_selected@3x.png”,

        “text”: “page2”

      },

      {

        “pagePath”: “pages/my/index”,

        “iconPath”: “images/tab_my_unchecked@3x.png”,

        “selectedIconPath”: “images/tab_my_selected@3x.png”,

        “text”: “page3”

      }

    ]

  },

这是我配置的tabbar代码。

这段代码,在安卓手机上, tabbar是白色,但是在IOS手机上显示的是黑色

比较懵逼, 怎么会这样?

找了好几个安卓和IOS的机器试了

3 回复
fangfu
fangfu1 楼6 年前

全部更换为十六进制颜色后,问题解决了。

谢谢 @天下雪

taogong
taogong2 楼6 年前

考虑把white这类英文颜色,全部更换为十六进制颜色后再试

qiaoyan
qiaoyan3 楼6 年前

这个问题我也有发现,确实存在的,还有一点tabBar中的icon如果不想展示,仅仅展示文字,ios下怎么居中