index.wxml 754 B

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. size="0.8em"
  9. class="{{ utils.bem('checkbox__icon', [shape, { disabled, checked: value }]) }}"
  10. style="font-size: {{ sizeWithUnit }};{{ checkedColor && value && !disabled ? 'border-color:' + checkedColor + '; background-color:' + checkedColor : '' }}"
  11. custom-class="icon-class"
  12. custom-style="line-height: 1.25em;"
  13. />
  14. </view>
  15. <view class="label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled }]) }}" bindtap="onClickLabel">
  16. <slot />
  17. </view>
  18. </view>