You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
2.0 KiB
51 lines
2.0 KiB
|
1 week ago
|
<view class="upload-list">
|
||
|
|
<view class="item" wx:for="{{fileList}}" wx:key="index" data-index="{{index}}" catchtap="viewFile">
|
||
|
|
<image wx:if="{{item.fileType==='image'}}" class="image" mode="aspectFill" src="{{item.url}}"></image>
|
||
|
|
<image wx:elif="{{item.fileType==='video'}}" class="image" mode="aspectFill" src="{{item.url}}"></image>
|
||
|
|
<image
|
||
|
|
wx:elif="{{item.fileType==='audio'}}"
|
||
|
|
class="sub-image"
|
||
|
|
mode="aspectFill"
|
||
|
|
src="{{imageUrl}}file.png?t={{Timestamp}}"
|
||
|
|
></image>
|
||
|
|
<image wx:else class="sub-image" mode="aspectFill" src="{{imageUrl}}{{item.fileType}}.png?t={{Timestamp}}"></image>
|
||
|
|
<view class="item_mask">
|
||
|
|
<image class="item_mask_icon" wx:if="{{item.fileType === 'video'}}" src="/images/icon17.png"></image>
|
||
|
|
<view class="clear" wx:if="{{delete}}" catchtap="deleteFile" data-item="{{item}}" data-index="{{index}}">
|
||
|
|
<van-icon name="cross" />
|
||
|
|
</view>
|
||
|
|
<view class="order">{{index+1}}</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view wx:if="{{upload && (maxNum === -1 || maxNum > fileList.length)}}" catchtap="handleAction">
|
||
|
|
<slot wx:if="{{isSlot}}"></slot>
|
||
|
|
|
||
|
|
<view wx:else class="btn">
|
||
|
|
<image class="icon" src="/images/icon16.png"></image>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- <van-action-sheet title=" " show="{{ show }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" /> -->
|
||
|
|
|
||
|
|
<van-popup
|
||
|
|
show="{{ show }}"
|
||
|
|
custom-styple="background-color: rgba(247, 247, 250, 1);"
|
||
|
|
safe-area-inset-bottom="{{false}}"
|
||
|
|
round
|
||
|
|
position="bottom"
|
||
|
|
closeable
|
||
|
|
bind:close="onClose"
|
||
|
|
>
|
||
|
|
<view class="popup">
|
||
|
|
<view class="item" bind:tap="onSelect" data-id="1">
|
||
|
|
<view class="title">选择视频或图片</view>
|
||
|
|
<image class="icon" src="{{imageUrl}}icon117.png?t={{Timestamp}}"></image>
|
||
|
|
</view>
|
||
|
|
<view class="item" bind:tap="onSelect" data-id="2">
|
||
|
|
<view class="title">选择聊天文件</view>
|
||
|
|
<image class="icon" src="{{imageUrl}}icon118.png?t={{Timestamp}}"></image>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</van-popup>
|