|
|
@ -372,7 +372,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
slideHandler(index, dontAnimate = false) {
|
|
|
|
slideHandler(index, dontAnimate = false) {
|
|
|
|
const { asNavFor, currentSlide, beforeChange, speed, afterChange } = this.$props;
|
|
|
|
const { asNavFor, beforeChange, speed, afterChange } = this.$props;
|
|
|
|
const { state, nextState } = slideHandler({
|
|
|
|
const { state, nextState } = slideHandler({
|
|
|
|
index,
|
|
|
|
index,
|
|
|
|
...this.$props,
|
|
|
|
...this.$props,
|
|
|
@ -381,7 +381,7 @@ export default {
|
|
|
|
useCSS: this.useCSS && !dontAnimate,
|
|
|
|
useCSS: this.useCSS && !dontAnimate,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (!state) return;
|
|
|
|
if (!state) return;
|
|
|
|
beforeChange && beforeChange(currentSlide, state.currentSlide);
|
|
|
|
beforeChange && beforeChange(this.currentSlide, state.currentSlide);
|
|
|
|
const slidesToLoad = state.lazyLoadedList.filter(
|
|
|
|
const slidesToLoad = state.lazyLoadedList.filter(
|
|
|
|
value => this.lazyLoadedList.indexOf(value) < 0,
|
|
|
|
value => this.lazyLoadedList.indexOf(value) < 0,
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -390,7 +390,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!this.$props.waitForAnimate && this.animationEndCallback) {
|
|
|
|
if (!this.$props.waitForAnimate && this.animationEndCallback) {
|
|
|
|
clearTimeout(this.animationEndCallback);
|
|
|
|
clearTimeout(this.animationEndCallback);
|
|
|
|
afterChange && afterChange(currentSlide);
|
|
|
|
afterChange && afterChange(this.currentSlide);
|
|
|
|
delete this.animationEndCallback;
|
|
|
|
delete this.animationEndCallback;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState(state, () => {
|
|
|
|
this.setState(state, () => {
|
|
|
|