<img
v-for="(item, index) in appealPhoto"
:key="index"
alt=""
:src="item.url"
width="80"
height="80"
style="padding: 5px"
@click="handleImg(index)"
/>
</div>
import Vue from 'vue';
import { ImagePreview } from 'vant';
Vue.use(ImagePreview);
export default
{ components: { [ImagePreview.Component.name]: ImagePreview.Component, }, };
handleImg(i){
let previewArr = this.appealPhoto.map((v) => {
return v.url
})
images: [ 'https://img01.yzcdn.cn/vant/apple-1.jpg', 'https://img01.yzcdn.cn/vant/apple-2.jpg', ],
ImagePreview({
images: previewArr,
showIndex: true,
loop: true,
startPosition: i
});
},