diff --git a/components/vc-slick/inner-slider.jsx b/components/vc-slick/inner-slider.jsx index a166d39cb5..380b2112df 100644 --- a/components/vc-slick/inner-slider.jsx +++ b/components/vc-slick/inner-slider.jsx @@ -372,7 +372,7 @@ export default { } }, slideHandler(index, dontAnimate = false) { - const { asNavFor, currentSlide, beforeChange, speed, afterChange } = this.$props; + const { asNavFor, beforeChange, speed, afterChange } = this.$props; const { state, nextState } = slideHandler({ index, ...this.$props, @@ -381,7 +381,7 @@ export default { useCSS: this.useCSS && !dontAnimate, }); if (!state) return; - beforeChange && beforeChange(currentSlide, state.currentSlide); + beforeChange && beforeChange(this.currentSlide, state.currentSlide); const slidesToLoad = state.lazyLoadedList.filter( value => this.lazyLoadedList.indexOf(value) < 0, ); @@ -390,7 +390,7 @@ export default { } if (!this.$props.waitForAnimate && this.animationEndCallback) { clearTimeout(this.animationEndCallback); - afterChange && afterChange(currentSlide); + afterChange && afterChange(this.currentSlide); delete this.animationEndCallback; } this.setState(state, () => {