From a93f520191e372356eac6ada8d4542d93eb98955 Mon Sep 17 00:00:00 2001 From: qiang Date: Sat, 6 Jul 2019 16:13:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20swiper=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=BF=AB=E9=80=9F=E6=BB=91=E5=8A=A8=E6=97=B6=E5=8D=A1?= =?UTF-8?q?=E4=BD=8F=E7=9A=84=E9=97=AE=E9=A2=98=20fixed=20#107?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/view/components/swiper/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/view/components/swiper/index.vue b/src/core/view/components/swiper/index.vue index 1c9fbb537..031596bdc 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) { -- GitLab