提交 a93f5201 编写于 作者: Q qiang

fix: 解决 swiper 组件快速滑动时卡住的问题 fixed #107

上级 e39c940b
...@@ -495,10 +495,11 @@ export default { ...@@ -495,10 +495,11 @@ export default {
} }
self._updateViewport(val) self._updateViewport(val)
} }
var time = (this._contentTrackT - contentTrackT) || 1
if (this.vertical) { 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 { } 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) { _handleTrackEnd (isCancel) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册