wx.setNavigationBarColor有的手机失效

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

app.json里设置了背景为红色,字体颜色为白色

“window”:{

    “navigationBarBackgroundColor”: “#F10215”,

    “navigationBarTextStyle”:“#fff”

  },

/pages/my/my里的my.json里设置背景为白色,字体为黑色

wx.setNavigationBarColor({

      frontColor: ‘#000000’,

      backgroundColor: ‘#ffffff’

    })

怎么有的手机里my这页的显示正常,有的手机无效

2 回复
wlei
wlei1 楼6 年前

有什么其他的办法来改变navigationBarBackgroundColor和navigationBarTextStyle呢?

laixia
laixia2 楼5 年前

注意看,,,上面说了,特定的版本以上才可以用

wx.setNavigationBarColor(OBJECT)

基础库 1.4.0 开始支持