12345678910111213141516171819202122232425 |
- <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>
|