From 6101b14c76127d90fdf9509cd7faafb2ee450697 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 26 Mar 2019 21:21:15 +0800 Subject: [PATCH] [bugfix] Swipe: unable to scroll page when opened (#3056) --- README.md | 5 ----- README.zh-CN.md | 5 ----- jest.config.js | 3 +-- packages/swipe-cell/index.js | 7 ++----- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index db6585eba..6a0757de4 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,6 @@

npm version Coverage Status - license - issue -

- -

Build Status downloads downloads diff --git a/README.zh-CN.md b/README.zh-CN.md index a84ff39ca..56672438a 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -6,11 +6,6 @@

npm version Coverage Status - license - issue -

- -

Build Status downloads downloads diff --git a/jest.config.js b/jest.config.js index 13b19358d..631346088 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,8 +16,7 @@ module.exports = { '!**/demo/**', '!**/locale/lang/**', '!**/sku/**', - '!**/waterfall/**', - '!**/icon/config/**' + '!**/waterfall/**' ], collectCoverage: true, coverageReporters: ['html', 'lcov', 'text-summary'], diff --git a/packages/swipe-cell/index.js b/packages/swipe-cell/index.js index 15a0817a4..8992ac802 100644 --- a/packages/swipe-cell/index.js +++ b/packages/swipe-cell/index.js @@ -72,11 +72,8 @@ export default sfc({ } this.dragging = true; + this.startOffset = this.offset; this.touchStart(event); - - if (this.opened) { - this.startX -= this.offset; - } }, onDrag(event) { @@ -88,7 +85,7 @@ export default sfc({ if (this.direction === 'horizontal') { event.preventDefault(); - this.swipeMove(this.deltaX); + this.swipeMove(this.deltaX + this.startOffset); } },