index.axml 1.6 KB

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