添加多图预览
This commit is contained in:
parent
e68db84093
commit
00e08c6ccc
@ -10,7 +10,7 @@
|
||||
<view v-if="item.type == 0">
|
||||
<scroll-view style="white-space: nowrap;" :scroll-x="true">
|
||||
<view class="flex">
|
||||
<u-image @click="preview(v.src, i)" class="thumb" v-for="(v, i) in item.files" :key="i" width="240rpx" height="240rpx" :border-radius="10" :src="v.src"></u-image>
|
||||
<u-image @click="preview(i)" class="thumb" v-for="(v, i) in item.files" :key="i" width="240rpx" height="240rpx" :border-radius="10" :src="v.src"></u-image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@ -68,9 +68,14 @@
|
||||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
preview(url) {
|
||||
preview(i) {
|
||||
let f = this.item.files.map((v) => {
|
||||
return v.src
|
||||
})
|
||||
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
current: i,
|
||||
urls: f
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user