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
1.7 KiB
51 lines
1.7 KiB
2 years ago
|
<view class="m-upload" wx:if="{{displayed}}">
|
||
|
<view class="list">
|
||
|
<view class="item"
|
||
|
wx:if="{{showAdd && max > attachmentList.length}}"
|
||
|
bind:tap="handleTapAdd">
|
||
|
<view class="item-add">
|
||
|
<image mode="aspectFill" src="/assets/images/upload/btn-add.png" />
|
||
|
</view>
|
||
|
</view>
|
||
|
|
||
|
<view class="item {{item.error ? 'z-error':''}}"
|
||
|
bind:tap="handleTapItem"
|
||
|
data-index="{{index}}"
|
||
|
wx:key="*this"
|
||
|
wx:for="{{attachmentList}}">
|
||
|
<view class="item-img"
|
||
|
wx:if="{{item.type==='image'}}">
|
||
|
<image mode="aspectFill"
|
||
|
class="item-img-bg"
|
||
|
src="{{ item.tempFilePath || item.url }}" />
|
||
|
<view class="item-img-name">{{item.name}}</view>
|
||
|
</view>
|
||
|
|
||
|
<view class="item-file" wx:else>
|
||
|
<view class="item-file-ico">
|
||
|
<image mode="aspectFill"
|
||
|
wx:if="{{item.type==='video'}}"
|
||
|
src="/assets/images/upload/video.png" />
|
||
|
<image mode="aspectFill"
|
||
|
wx:elif="{{item.format==='doc' || item.format==='docx'}}"
|
||
|
src="/assets/images/upload/word.png" />
|
||
|
<image mode="aspectFill"
|
||
|
wx:elif="{{item.format==='xls' || item.format==='xlsx'}}"
|
||
|
src="/assets/images/upload/excel.png" />
|
||
|
<image mode="aspectFill"
|
||
|
wx:elif="{{item.format==='ppt' || item.format==='pptx'}}"
|
||
|
src="/assets/images/upload/ppt.png" />
|
||
|
<image mode="aspectFill"
|
||
|
wx:elif="{{item.format==='pdf'}}"
|
||
|
src="/assets/images/upload/pdf.png" />
|
||
|
</view>
|
||
|
|
||
|
<view class="item-file-name">{{item.name}}</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
|
||
|
<input-fixed id="inputName" />
|
||
|
|