index.wxml 1.1 KB

123456789101112131415161718
  1. <view class="wux-class {{ classes.wrap }}">
  2. <view class="{{ classes.files }}">
  3. <block wx:if="{{ listType === 'picture-card' && showUploadList && uploadFileList.length }}">
  4. <block wx:for="{{ uploadFileList }}" wx:for-item="file" wx:key="uid">
  5. <view class="{{ classes.file }} {{ file.status ? prefixCls + '__file--' + file.status : '' }}" data-file="{{ file }}" data-index="{{ index }}" bindtap="onPreview">
  6. <video id="{{ file.uid }}" class="{{ classes.thumb }}" src="{{ file.url }}" wx:if="{{ isVideo }}" />
  7. <image class="{{ classes.thumb }}" src="{{ file.url }}" wx:else />
  8. <view class="{{ classes.remove }}" data-file="{{ file }}" data-index="{{ index }}" catchtap="onRemove" wx:if="{{ showRemoveIcon }}"></view>
  9. </view>
  10. </block>
  11. </block>
  12. <view class="{{ classes.select }}" bindtap="onSelect" wx:if="{{ uploadMax === -1 || uploadMax > uploadFileList.length }}">
  13. <view class="{{ classes.button }}">
  14. <slot></slot>
  15. </view>
  16. </view>
  17. </view>
  18. </view>