diff --git a/src/core/view/components/swiper/index.vue b/src/core/view/components/swiper/index.vue index 1c9fbb537ef5538f8576e0b393ff318c3c595fe3..031596bdc740f053135039a067f2722c300f0fe9 100644 --- a/src/core/view/components/swiper/index.vue +++ b/src/core/view/components/swiper/index.vue @@ -495,10 +495,11 @@ export default { } self._updateViewport(val) } + var time = (this._contentTrackT - contentTrackT) || 1 if (this.vertical) { - move(-data.dy / this.$refs.slideFrame.offsetHeight, -data.ddy / (this._contentTrackT - contentTrackT)) + move(-data.dy / this.$refs.slideFrame.offsetHeight, -data.ddy / time) } else { - move(-data.dx / this.$refs.slideFrame.offsetWidth, -data.ddx / (this._contentTrackT - contentTrackT)) + move(-data.dx / this.$refs.slideFrame.offsetWidth, -data.ddx / time) } }, _handleTrackEnd (isCancel) {