index.wxml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <wxs
  2. src="./index.wxs"
  3. module="utils" />
  4. <view
  5. class="ant-checklist {{ className || '' }}"
  6. style="{{ style || '' }}">
  7. <view class="ant-checklist-body">
  8. <block
  9. wx:for="{{ options }}"
  10. wx:for-index="index"
  11. wx:for-item="item">
  12. <ant-checklist-item
  13. checked="{{ utils.getChecked(item.value, mixin.value, multiple) }}"
  14. item="{{ item }}"
  15. bind:change="onChange">
  16. <view
  17. slot="content"
  18. class="ant-checklist-item-content-box-nut">
  19. <image
  20. wx:if="{{ item.image }}"
  21. class="ant-checklist-item-image"
  22. src="{{ item.image }}" />
  23. <view
  24. class="ant-checklist-item-text {{ item.image ? '' : 'ant-checklist-item-text-no-image' }}">
  25. <view
  26. class="ant-checklist-item-text-title {{ item.disabled ? 'ant-checklist-item-text-disabled' : '' }}">
  27. {{ item.title }}
  28. </view>
  29. <view
  30. wx:if="{{ item.description }}"
  31. class="ant-checklist-item-text-description {{ item.disabled ? 'ant-checklist-item-text-disabled' : '' }}">
  32. {{ item.description }}
  33. </view>
  34. </view>
  35. </view>
  36. <view slot="icon">
  37. <ant-icon
  38. type="CheckOutline"
  39. className="ant-checklist-item-check-icon" />
  40. </view>
  41. </ant-checklist-item>
  42. </block>
  43. </view>
  44. </view>