2025-06-19 17:33:18 +08:00

22 lines
898 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--components/uploadPic/uploadPic.wxml-->
<view class="upload-container">
<view class="upload">
<view class="upload-btn" wx:if="{{photoList.length < maxLength}}" bindtap="choosePhoto">
<image src="../../images/icon_upload.png" mode=""/>
<view class="val">上传图片</view>
</view>
<!-- 注意bindtap 和 catchtap的区别catchtap可以阻止事件冒泡-->
<view class="photo-list" wx:for="{{photoList}}" data-index="{{index}}" bindtap="previewImg" wx:key="index">
<image src="{{item.fileUrl}}" mode=""/>
<view class="del" catchtap="delImg" data-index="{{index}}">
<image src="../../images/btn_del.png" mode=""/>
</view>
</view>
<!-- <van-uploader
accept="image"
file-list="{{ photoList }}"
max-count="{{ maxLength }}"
deletable="{{ true }}"
bind:after-read="uploadImg" /> -->
</view>
</view>