wx.setTabBarBadge在IOS上text为空时显示异常
发布于 5 年前 作者 yong08 1788 次浏览 来自 问答

carNumber() {

if (this.globalData.carNumber != ‘0’) {

wx.setTabBarBadge({

index: 2,

text: this.globalData.carNumber+’’

})

}else{

wx.setTabBarBadge({

index: 2,

text: ‘’

})

}

},

怎么让text值为空或者为‘0’时,隐藏这个大红点,在安卓上面是可以的。

回到顶部