From 6cf7bfc2b03274803a5f8369178f43f194157a5a Mon Sep 17 00:00:00 2001 From: h3n5 <295779204@qq.com> Date: Mon, 26 Oct 2020 14:27:26 +0800 Subject: [PATCH] fix swiper's bugs --- src/components/swiper/swiper.js | 4 +++- src/components/swiper/swiper.vue | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/swiper/swiper.js b/src/components/swiper/swiper.js index 152af99cb..82e6abca1 100755 --- a/src/components/swiper/swiper.js +++ b/src/components/swiper/swiper.js @@ -170,7 +170,9 @@ class Swiper { me._setTransform(distance) } - noScrollerY && e.preventDefault() + if (e.cancelable) { + noScrollerY && e.preventDefault() + } } me.touchendHandler = (e) => { diff --git a/src/components/swiper/swiper.vue b/src/components/swiper/swiper.vue index 47e10e09e..60f712b3f 100755 --- a/src/components/swiper/swiper.vue +++ b/src/components/swiper/swiper.vue @@ -82,7 +82,7 @@ export default { interval: this.interval, threshold: this.threshold, duration: this.duration, - height: this.height || this._height, + height: this.height || this.xheight, minMovingDistance: this.minMovingDistance, imgList: this.imgList })