index.wxml 703B

12345678910111213141516171819
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view class="van-checkbox custom-class">
  3. <view class="van-checkbox__icon-wrap" bindtap="toggle">
  4. <slot wx:if="{{ useIconSlot }}" name="icon" />
  5. <van-icon
  6. wx:else
  7. name="success"
  8. class="{{ utils.bem('checkbox__icon', [shape, { disabled, checked: value }]) }}"
  9. style="{{ checkedColor && value && !disabled ? 'border-color:' + checkedColor + '; background-color:' + checkedColor : '' }}"
  10. custom-class="icon-class"
  11. custom-style="line-height: 20px;"
  12. />
  13. </view>
  14. <view class="label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled }]) }}" bindtap="onClickLabel">
  15. <slot />
  16. </view>
  17. </view>