Skip to content

Commit fd34a0f

Browse files
authored
Merge pull request #4 from DamonAmber/patch-1
修复mp-tabbar中,未设置badge值却依旧显示红点的问题
2 parents 7831519 + f8220c5 commit fd34a0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tabbar/tabbar.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<view data-index='{{index}}' bindtap="tabChange" wx:for="{{list}}" class="weui-tabbar__item {{index === current ? 'weui-bar__item_on' : ''}}">
44
<view style="position: relative;display:inline-block;">
55
<image src="{{current === index ? item.selectedIconPath : item.iconPath}}" class="weui-tabbar__icon"></image>
6-
<mp-badge content="{{item.badge}}" style="position: absolute;top:-2px;left:calc(100% - 3px)"></mp-badge>
6+
<mp-badge wx:if="{{item.badge}}" content="{{item.badge}}" style="position: absolute;top:-2px;left:calc(100% - 3px)"></mp-badge>
77
</view>
88
<view class="weui-tabbar__label">{{item.text}}</view>
99
</view>

0 commit comments

Comments
 (0)