yunshangxie/unpackage/dist/dev/mp-weixin/tuniao-ui/components/tn-image-upload/tn-image-upload.wxml

1 line
2.3 KiB
Plaintext
Raw Normal View History

2024-04-24 17:34:38 +08:00
<view class="tn-image-upload-class tn-image-upload data-v-2546f4ca"><block wx:if="{{showUploadList}}"><block class="data-v-2546f4ca"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="tn-image-upload__item tn-image-upload__item-preview data-v-2546f4ca" style="{{'width:'+(item.g0)+';'+('height:'+(item.g1)+';')}}"><block wx:if="{{deleteable}}"><view data-event-opts="{{[['tap',[['deleteItem',[index]]]]]}}" class="tn-image-upload__item-preview__delete data-v-2546f4ca" style="{{'border-top-color:'+(deleteBackgroundColor)+';'}}" catchtap="__e"><view class="{{['tn-image-upload__item-preview__delete--icon','data-v-2546f4ca','tn-icon-'+deleteIcon]}}" style="{{'color:'+(deleteColor)+';'}}"></view></view></block><block wx:if="{{showProgress&&item.$orig.progress>0&&!item.$orig.error}}"><tn-line-progress class="tn-image-upload__item-preview__progress data-v-2546f4ca" vue-id="{{'f8cfb508-1-'+index}}" percent="{{item.$orig.progress}}" showPercent="{{false}}" round="{{false}}" height="{{8}}" bind:__l="__l"></tn-line-progress></block><block wx:if="{{item.$orig.error}}"><view data-event-opts="{{[['tap',[['retry',[index]]]]]}}" class="tn-image-upload__item-preview__error-btn data-v-2546f4ca" catchtap="__e">点击重试</view></block><image class="tn-image-upload__item-preview__image data-v-2546f4ca" src="{{item.$orig.url||item.$orig.path}}" mode="{{imageMode}}" data-event-opts="{{[['tap',[['doPreviewImage',[item.$orig.url||item.$orig.path,index]]]]]}}" catchtap="__e"></image></view></block></block></block><slot name="file"></slot><scoped-slots-file file="{{lists}}" class="scoped-ref" bind:__l="__l"></scoped-slots-file><block wx:if="{{maxCount>$root.g2}}"><view data-event-opts="{{[['tap',[['selectFile',['$event']]]]]}}" class="{{['tn-image-upload__add','data-v-2546f4ca',(customBtn)?'tn-image-upload__add--custom':'']}}" bindtap="__e"><block wx:if="{{!customBtn}}"><view class="tn-image-upload__item tn-image-upload__item-add data-v-2546f4ca" style="{{'width:'+($root.g3)+';'+('height:'+($root.g4)+';')}}" hover-class="tn-hover-class" hover-stay-time="150"><view class="tn-image-upload__item-add--icon tn-icon-add data-v-2546f4ca"></view><view class="tn-image-upload__item-add__tips data-v-2546f4ca">{{uploadText}}</view></view></block><view class="data-v-2546f4ca"><slot name="addBtn"></slot></view></view></block></view>