index.wxml 839 B

1234567891011121314151617181920212223242526272829
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view
  3. wx:if="{{ loading }}"
  4. class="custom-class {{ utils.bem('skeleton', [{animate}]) }}"
  5. >
  6. <view
  7. wx:if="{{ avatar }}"
  8. class="avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}"
  9. style="{{ 'width:' + avatarSize + ';height:' + avatarSize }}"
  10. />
  11. <view class="{{ utils.bem('skeleton__content')}}">
  12. <view
  13. wx:if="{{ title }}"
  14. class="title-class {{ utils.bem('skeleton__title') }}"
  15. style="{{ 'width:' + titleWidth }}"
  16. />
  17. <view
  18. wx:for="{{ rowArray }}"
  19. wx:key="index"
  20. wx:for-index="index"
  21. class="row-class {{ utils.bem('skeleton__row') }}"
  22. style="{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}"
  23. />
  24. </view>
  25. </view>
  26. <view wx:else class="{{ utils.bem('skeleton__content')}}">
  27. <slot />
  28. </view>