switch.wxml 505 B

12345678910111213
  1. <view class="t-class {{classPrefix}}">
  2. <view wx:if="{{label}}" class="{{classPrefix}}__label t-class-label">{{label}}</view>
  3. <view
  4. class="{{classPrefix}}__body t-class-body {{isActive ? classPrefix + '__body--active' : ''}} {{disabled ? classPrefix + '__body--disabled' : ''}}"
  5. style="{{bodyStyle}}"
  6. bindtap="onTapBackground"
  7. >
  8. <view
  9. class="{{classPrefix}}__dot t-class-dot {{isActive ? classPrefix + '__dot--active' : ''}}"
  10. catchtap="onTapDot"
  11. />
  12. </view>
  13. </view>