...
|
...
|
@@ -2,12 +2,11 @@ |
|
|
<div class="image-swipe">
|
|
|
<div class="swipe-wrap">
|
|
|
<swiper :options="swiperOption" v-ref:swiper>
|
|
|
<swiper-slide v-for="item in goods">
|
|
|
<swiper-slide v-for="(index, item) in goods">
|
|
|
<img title="{{item.title}}"
|
|
|
:src="item.color_image | resize 580 770"
|
|
|
width="100%" alt=""
|
|
|
data-index="{{$index}}"
|
|
|
@click.prevent="showcase()">
|
|
|
@click="showcase(index)">
|
|
|
</swiper-slide>
|
|
|
</swiper>
|
|
|
</div>
|
...
|
...
|
@@ -83,17 +82,17 @@ |
|
|
},
|
|
|
computed: {
|
|
|
swiper() {
|
|
|
return this.$refs.swiper.swiper
|
|
|
return this.$refs.swiper.wisper
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
showcase: function() {
|
|
|
alert(this.swiper.activeIndex);
|
|
|
showcase: function(index) {
|
|
|
alert(index);
|
|
|
const opts = {
|
|
|
index,
|
|
|
images: this.goods.map((item) => {
|
|
|
return item.color_image;
|
|
|
}).filter(image => image),
|
|
|
index: this.swiper.activeIndex
|
|
|
};
|
|
|
|
|
|
yoho.goImageBrowser(opts);
|
...
|
...
|
|