diff --git a/src/components/swiper/metas.yml b/src/components/swiper/metas.yml index 73d82e5a2..e8da5a75b 100644 --- a/src/components/swiper/metas.yml +++ b/src/components/swiper/metas.yml @@ -118,6 +118,11 @@ events: en: fires after height is caculated zh-CN: 高度获取后触发 changes: + next: + en: + - '[fix] fix cannot scroll body when touching with one item' + zh-CN: + - '[fix] 修复只有一个 item 时无法滚动页面的问题' 2.7.6: en: - '[enhance] stop moving width one item' diff --git a/src/components/swiper/swiper.js b/src/components/swiper/swiper.js index 6d229af5f..e5350f3b5 100755 --- a/src/components/swiper/swiper.js +++ b/src/components/swiper/swiper.js @@ -148,7 +148,7 @@ class Swiper { } me.touchmoveHandler = (e) => { if (me.count === 1) { - return e.preventDefault() + return } me._move.x = e.changedTouches[0].pageX me._move.y = e.changedTouches[0].pageY @@ -171,6 +171,9 @@ class Swiper { } me.touchendHandler = (e) => { + if (me.count === 1) { + return + } me._end.x = e.changedTouches[0].pageX me._end.y = e.changedTouches[0].pageY