index.wxml 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <wxs
  2. src="./index.wxs"
  3. module="componentUtils" />
  4. <label
  5. class="ant-checkbox-item {{ className || '' }}"
  6. style="{{ style || '' }}">
  7. <view class="ant-checkbox-item-container">
  8. <view class="ant-checkbox-item-wrap">
  9. <checkbox-group bindchange="onChange">
  10. <checkbox
  11. class="ant-checkbox-item-base"
  12. value="{{ value }}"
  13. checked="{{ mixin.value }}"
  14. disabled="{{ disabled }}" />
  15. </checkbox-group>
  16. <view class="ant-checkbox-item-fake">
  17. <view
  18. class="ant-checkbox-item-fake-{{ componentUtils.getClassName(mixin.value, disabled) }}"
  19. style="{{ mixin.value && !disabled && color ? 'background:' + color : '' }}">
  20. <ant-icon
  21. wx:if="{{ mixin.value }}"
  22. type="CheckOutline"
  23. className="ant-checkbox-item-fake-{{ componentUtils.getClassName(mixin.value, disabled) }}-icon" />
  24. </view>
  25. </view>
  26. </view>
  27. <view
  28. class="ant-checkbox-item-content {{ disabled ? 'ant-checkbox-item-disabled' : '' }}">
  29. <slot />
  30. </view>
  31. </view>
  32. </label>