This commit is contained in:
liuye
2021-12-23 16:19:05 +08:00
parent 897b8a5a46
commit 0f29dbfd22
2 changed files with 9 additions and 2 deletions

View File

@@ -20,7 +20,7 @@
</div>
<div class="imgs">
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" />
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" v-if="i < 3" @click.stop="previewImage(item.images, items.url)" />
</div>
</template>
@@ -142,6 +142,13 @@ export default {
this.currentTabs = index
this.getList()
},
previewImage (images, img) {
uni.previewImage({
urls: images.map(v => v.url),
current: img
})
},
},
onReachBottom() {
this.current = this.current + 1