step-item.wxml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <wxs src="../common/utils.wxs" module="_" />
  2. <view
  3. style="{{customStyle}}"
  4. class="{{_.cls(classPrefix, [layout, ['readonly', readonly]])}} {{prefix}}-class"
  5. bind:tap="onTap"
  6. >
  7. <!-- icon -->
  8. <view class="{{_.cls(classPrefix + '__anchor', [layout])}}">
  9. <view wx:if="{{isDot}}" class="{{_.cls(classPrefix + '__dot', [curStatus])}}" />
  10. <view wx:elif="{{icon}}" class="{{_.cls(classPrefix + '__icon', [curStatus])}}">
  11. <slot name="icon" />
  12. <t-icon name="{{icon}}" size="22" />
  13. </view>
  14. <view wx:else class="{{_.cls(classPrefix + '__circle', [curStatus])}}">
  15. <t-icon wx:if="{{curStatus == 'finish'}}" name="check" />
  16. <t-icon wx:elif="{{curStatus == 'error'}}" name="close" />
  17. <block wx:else>{{index + 1}}</block>
  18. </view>
  19. </view>
  20. <!-- content -->
  21. <view class="{{_.cls(classPrefix + '__content', [layout, ['last', isLastChild]])}} {{prefix}}-class-content">
  22. <view class="{{_.cls(classPrefix + '__title', [curStatus, layout])}} {{prefix}}-class-title">
  23. {{ title }}
  24. <slot name="title" />
  25. <slot wx:if="{{layout === 'vertical'}}" name="title-right" />
  26. </view>
  27. <view class="{{_.cls(classPrefix + '__description', [layout])}} {{prefix}}-class-description">
  28. {{ content }}
  29. <slot name="content" />
  30. </view>
  31. <view class="{{_.cls(classPrefix + '__extra', [layout])}} {{prefix}}-class-extra">
  32. <slot name="extra" />
  33. </view>
  34. </view>
  35. <view wx:if="{{!isLastChild}}" class="{{_.cls(classPrefix + '__line', [curStatus, layout, theme])}}" />
  36. </view>