【uni-app】底部tabbar导航栏右上角添加数字标记

效果图:

 uni.setTabBarBadge(OBJECT)

为 tabBar 某一项的右上角添加文本。

 eg:

uni.setTabBarBadge({
  index: 0,
  text: '1'
})

更多设置TabBar,参考:https://uniapp.dcloud.io/api/ui/tabbar?id=settabbaritem

原文地址:https://www.cnblogs.com/hellocd/p/14107428.html