You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.0 KiB

<wxs src="./badge.wxs" module="this" />
<wxs src="../common/utils.wxs" module="_" />
<view
style="{{_._style([style, customStyle])}}"
class="{{this.getBadgeOuterClass({shape})}} class {{prefix}}-class"
aria-labelledby="{{labelID}}"
aria-describedby="{{descriptionID}}"
aria-role="{{ ariaRole || 'option'}}"
>
<view id="{{labelID}}" class="{{classPrefix}}__content {{prefix}}-class-content" aria-hidden="true">
<slot wx:if="{{!content}}" class="{{classPrefix}}__content-slot" />
<text wx:else class="{{classPrefix}}__content-text">{{content}}</text>
</view>
<view
wx:if="{{this.isShowBadge({dot,count,showZero})}}"
id="{{descriptionID}}"
class="{{this.getBadgeInnerClass({dot, size, shape, count})}} {{prefix}}-has-count {{prefix}}-class-count"
style="{{this.getBadgeStyles({color, offset})}}"
aria-hidden="true"
aria-label="{{ ariaLabel || this.getBadgeAriaLabel({dot, count, maxCount}) }}"
>{{ this.getBadgeValue({dot, count, maxCount}) }}
</view>
<slot name="count" />
</view>