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

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

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