红点提示方法

1、显示红点和内容

uni.setTabBarBadge({

  index: 0, //tabBar的哪一项,从左边算起

  text: '1'  //显示的内容

})

如下图

2、只显示红点

 uni.showTabBarRedDot({
   index:1  //tabBar的哪一项,从左边算起
})

如下图

 

posted @ 2020-12-24 17:18  山城代码君  阅读(294)  评论(0)    收藏  举报