提交 3a727a60 编写于 作者: D DCloud_LXH

fix: swiper 无法滑动的 bug

上级 d367dd8a
......@@ -162,6 +162,7 @@ export default {
mounted () {
this._currentCheck()
this.touchtrack(this.$refs.slidesWrapper, '_handleContentTrack', true)
this._resetLayout()
this.$watch(() => {
return this.autoplay && !this.userTracking
}, this._inintAutoplay)
......@@ -486,6 +487,7 @@ export default {
}
},
_handleTrackStart () {
if (!this.items.length) return
this._cancelSchedule()
this._contentTrackViewport = this._viewportPosition
this._contentTrackSpeed = 0
......@@ -493,6 +495,7 @@ export default {
this._cancelViewportAnimation()
},
_handleTrackMove (data) {
if (!this.items.length) return
var self = this
var contentTrackT = this._contentTrackT
this._contentTrackT = Date.now()
......@@ -527,6 +530,7 @@ export default {
}
},
_handleTrackEnd (isCancel) {
if (!this.items.length) return
this.userTracking = false
var t = this._contentTrackSpeed / Math.abs(this._contentTrackSpeed)
var n = 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册