图片预览

This commit is contained in:
花有清香月有阴
2021-12-24 19:56:03 +08:00
parent 9f55d3a6ee
commit 979253bc04
7 changed files with 50 additions and 8 deletions

View File

@@ -80,7 +80,7 @@
</div>
<div class="imgs">
<img :src="e.url" alt="" v-for="(e, i) in item.files" :key="i" />
<img :src="e.url" alt="" v-for="(e, i) in item.files" :key="i" @click.stop="previewImage(item.files, e.url)" />
</div>
<span class="types" :style="{ background: item.type == 0 ? '#FF65B8' : item.type == 1 ? '#FF883C' : '#1AAAFF' }">
@@ -297,6 +297,13 @@ export default {
this.getList()
}
},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
},
onReachBottom() {
this.current = this.current + 1