发布页增加图片预览

This commit is contained in:
TOP糯米 2023-03-23 00:35:32 +08:00
parent faf69ea970
commit d8ddbbdecd
1 changed files with 10 additions and 1 deletions

View File

@ -100,7 +100,7 @@
<view class="upload-item">
<block v-for="(item, index) in uploadImages" :key="index">
<view class="image-box">
<image class="image" :src="item" mode="aspectFill" />
<image class="image" :src="item" mode="aspectFill" @click="previewImage(index)" />
</view>
</block>
</view>
@ -378,6 +378,15 @@ export default {
}
this.total = parseFloat(this.price) + temp;
},
/**
* 预览图片
*/
previewImage(index) {
uni.previewImage({
urls: this.uploadImages,
current: index,
});
},
/**
* 发布报价
*/