像素方舟_青阳
像素方舟_青阳
  • 发布:2021-11-18 20:06
  • 更新:2021-12-06 11:54
  • 阅读:339

【报Bug】3.2.12 正式包,安卓 uni.showTabBarRedDot 当 index 为最后一项时,红点不显示

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: macOS Big Sur 11.2.3

HBuilderX类型: 正式

HBuilderX版本号: 3.2.12

手机系统: Android

手机系统版本号: Android 12

手机厂商: 小米

手机机型: iPhone 12

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<template>  
  <view class="content">  
    <text>uni.showTabBarRedDot 测试:</text>  
    <button @click="onRedDot(0)">红点0</button>  
    <button @click="onRedDot(1)">红点1</button>  
    <button @click="onRedDot(2)">红点2</button>  
    <button @click="onRedDot(3)">红点3</button>  
    <button @click="onRedDot(4)">红点4</button>  
    <text>uni.setTabBarBadge 测试:</text>  
    <button @click="onRedDotText(0, '10')">提醒10</button>  
    <button @click="onRedDotText(1, '11')">提醒11</button>  
    <button @click="onRedDotText(2, '12')">提醒12</button>  
    <button @click="onRedDotText(3, '13')">提醒13</button>  
    <button @click="onRedDotText(4, '14')">提醒14</button>  
  </view>  
</template>  

<script>  
export default {  
  methods: {  
    onRedDot(index) {  
      uni.showTabBarRedDot({ index });  
    },  
    onRedDotText(index, text) {  
      uni.setTabBarBadge({ index, text });  
    },  
  },  
};  
</script>  

<style>  
.content {  
  display: flex;  
  flex-direction: column;  
  align-items: center;  
  justify-content: center;  
}  
</style>

操作步骤:

真机运行即可

预期结果:

红点正常显示

实际结果:

最后一个tab 在安卓下不显示红点

bug描述:

uni.showTabBarRedDot 和 uni.setTabBarBadge 在设置最后一个的时候都会有问题

2021-11-18 20:06 负责人:无 分享
已邀请:
像素方舟_青阳

像素方舟_青阳 (作者)

上个版本正常,3.2.12 版本只有安卓有问题

DCloud_UNI_Anne

DCloud_UNI_Anne

DCloud_UNI_Anne

DCloud_UNI_Anne

HX3.2.15+已修复该问题

该问题目前已经被锁定, 无法添加新回复