uni-app 3.2.12 正式包安卓平台问题:uni.showTabBarRedDot 当 index 为最后一项时红点不显示
uni-app 3.2.12 正式包安卓平台问题:uni.showTabBarRedDot 当 index 为最后一项时红点不显示
| 开发环境 | 版本号 | 项目创建方式 |
|---|---|---|
| Windows | macOS Big Sur 11.2.3 | 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 在设置最后一个的时候都会有问题

更多关于uni-app 3.2.12 正式包安卓平台问题:uni.showTabBarRedDot 当 index 为最后一项时红点不显示的实战教程也可以访问 https://www.itying.com/category-93-b0.html
3 回复
上个版本正常,3.2.12 版本只有安卓有问题
更多关于uni-app 3.2.12 正式包安卓平台问题:uni.showTabBarRedDot 当 index 为最后一项时红点不显示的实战教程也可以访问 https://www.itying.com/category-93-b0.html
已加分,感谢您的反馈!查看关联问题:https://ask.dcloud.net.cn/question/134420
HX3.2.15+已修复该问题

