index.wxml 1.2 KB

123456789101112131415161718192021222324252627
  1. <view
  2. class="ant-progress ant-progress-{{ type }} {{ className || '' }}"
  3. style="{{ style || '' }};{{ type === 'circle' ? 'width:' + width + 'px;height:' + width + 'px;' : '' }}">
  4. <canvas
  5. wx:if="{{ type === 'circle' }}"
  6. class="ant-progress-canvas"
  7. canvas-id="ant-progress-canvas" />
  8. <view
  9. wx:elif="{{ type === 'line' }}"
  10. class="ant-progress-outer"
  11. style="{{ strokeWidth ? 'height:' + strokeWidth + 'px;' : '' }}{{ trailColor ? 'background-color:' + trailColor : '' }}">
  12. <view
  13. class="ant-progress-inner {{ status === 'success' || status === 'exception' ? 'ant-progress-inner-' + status : '' }}"
  14. style="width: {{ curProgress }}%; {{ strokeColor ? 'background-color:' + strokeColor : '' }}" />
  15. </view>
  16. <view class="ant-progress-indicator">
  17. <slot
  18. name="indicator"
  19. percent="{{ percent }}">
  20. <ant-icon
  21. wx:if="{{ status === 'success' || status === 'exception' }}"
  22. type="{{ status === 'success' ? 'CheckCircleFill' : 'CloseCircleFill' }}"
  23. className="ant-progress-status-icon ant-progress-status-icon-{{ status }}" />
  24. <block wx:else>{{ percent }}%</block>
  25. </slot>
  26. </view>
  27. </view>