project init
This commit is contained in:
15
components/badge/badge.wxml
Normal file
15
components/badge/badge.wxml
Normal file
@@ -0,0 +1,15 @@
|
||||
<wxs src="./badge.wxs" module="this" />
|
||||
|
||||
<view class="{{this.getBadgeOuterClass({shape})}} t-class">
|
||||
<view class="{{classPrefix}}__content t-class-content">
|
||||
<slot wx:if="{{!content}}" class="{{classPrefix}}__content-slot" />
|
||||
<text wx:else class="{{classPrefix}}__content-text">{{content}}</text>
|
||||
</view>
|
||||
<view
|
||||
wx:if="{{count !== 'slot' && this.isShowBadge({dot,count,showZero})}}"
|
||||
class="{{this.getBadgeInnerClass({dot, size, shape, count})}} t-has-count t-class-count"
|
||||
style="{{this.getBadgeStyles({color, offset})}}"
|
||||
>{{ this.getBadgeValue({dot, count, maxCount}) }}
|
||||
</view>
|
||||
<slot name="count" wx:if="{{count === 'slot' || !count}}" />
|
||||
</view>
|
||||
Reference in New Issue
Block a user