提交 89a9a668 编写于 作者: d-u-a's avatar d-u-a

fix: tabbar 某些情况下 setTabBarBadge 出现重复的 badge

上级 0ad53831
......@@ -55,13 +55,6 @@
v-else-if="!item.isMidButton"
:src="_getRealPath(getIconPath(item,index))"
>
<div
v-if="item.redDot"
:class="{'uni-tabbar__badge':!!item.badge}"
class="uni-tabbar__reddot"
>
{{ item.badge }}
</div>
</div>
<div
v-if="item.text"
......@@ -74,13 +67,13 @@
class="uni-tabbar__label"
>
{{ item.text }}
<div
v-if="item.redDot&&!item.iconPath"
:class="{'uni-tabbar__badge':!!item.badge}"
class="uni-tabbar__reddot"
>
{{ item.badge }}
</div>
</div>
<div
v-if="item.redDot"
:class="{'uni-tabbar__badge':!!item.badge}"
class="uni-tabbar__reddot"
>
{{ item.badge }}
</div>
</div>
</div>
......@@ -199,14 +192,14 @@
uni-tabbar .uni-tabbar__reddot {
position: absolute;
top: 0;
top: 2px;
right: 0;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #f43530;
color: #ffffff;
transform: translate(40%, -20%);
transform: translate(40%, 0%);
}
uni-tabbar .uni-tabbar__badge {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册