Authored by 陈峰

线上问题修复

{
"name": "yohoblk-wap",
"version": "2.0.35",
"version": "2.0.36",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -20,10 +20,12 @@ export default ['AwesomeSwiper', function AwesomeSwiper() {
return {};
}
},
name: String
name: String,
regSuccess: Function
},
mounted() {
if (this[this.name] && this.$parent) {
this.regSuccess && this.regSuccess(this[this.name]);
if (this[this.name] && this.$parent) { // TODO remove
this.$parent[this.name] = this[this.name];
}
},
... ...
<template>
<resource class="focus-image">
<awesome-swiper name="mySwiper" :options="swiperOption" class="swipe">
<awesome-swiper name="mySwiper" :reg-success="swiperSuccess" :options="swiperOption" class="swipe">
<div class="swiper-wrapper" @click="activeLink">
<div class="swiper-slide"
v-for="focus in value.data"
... ... @@ -42,6 +42,9 @@
}
},
methods: {
swiperSuccess(swiper) {
this.mySwiper = swiper;
},
activeLink() {
const img = this.value.data[this.mySwiper.realIndex];
... ...