wx.setTabBarBadge在IOS上text为空时显示异常

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

carNumber() {

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

wx.setTabBarBadge({

index: 2,

text: this.globalData.carNumber+‘’

})

}else{

wx.setTabBarBadge({

index: 2,

text: ‘’

})

}

},

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

1 回复
mintao
mintao1 楼5 年前