红点提示方法

1、显示红点和内容

uni.setTabBarBadge({

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

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

})

如下图

2、只显示红点

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

如下图

原文地址:https://www.cnblogs.com/color123456/p/14185184.html