Skip to content

Commit

Permalink
[bugfix] Swipe: unable to scroll page when opened (youzan#3056)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Mar 26, 2019
1 parent 49494c9 commit 6101b14
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
<p align="center">
<img src="https://img.shields.io/npm/v/vant.svg?style=flat-square" alt="npm version" />
<img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square" alt="Coverage Status" />
<img src="https://img.shields.io/npm/l/vant.svg?style=flat-square" alt="license" />
<img src="https://isitmaintained.com/badge/open/youzan/vant.svg" alt="issue" />
</p>

<p align="center">
<img src="https://travis-ci.org/youzan/vant.svg?branch=master" alt="Build Status" />
<img src="https://img.shields.io/npm/dt/vant.svg?style=flat-square" alt="downloads" />
<img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square" alt="downloads" />
Expand Down
5 changes: 0 additions & 5 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
<p align="center">
<img src="https://img.shields.io/npm/v/vant.svg?style=flat-square" alt="npm version" />
<img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square" alt="Coverage Status" />
<img src="https://img.shields.io/npm/l/vant.svg?style=flat-square" alt="license" />
<img src="https://isitmaintained.com/badge/open/youzan/vant.svg" alt="issue" />
</p>

<p align="center">
<img src="https://travis-ci.org/youzan/vant.svg?branch=master" alt="Build Status" />
<img src="https://img.shields.io/npm/dt/vant.svg?style=flat-square" alt="downloads" />
<img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square" alt="downloads" />
Expand Down
3 changes: 1 addition & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ module.exports = {
'!**/demo/**',
'!**/locale/lang/**',
'!**/sku/**',
'!**/waterfall/**',
'!**/icon/config/**'
'!**/waterfall/**'
],
collectCoverage: true,
coverageReporters: ['html', 'lcov', 'text-summary'],
Expand Down
7 changes: 2 additions & 5 deletions packages/swipe-cell/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -88,7 +85,7 @@ export default sfc({

if (this.direction === 'horizontal') {
event.preventDefault();
this.swipeMove(this.deltaX);
this.swipeMove(this.deltaX + this.startOffset);
}
},

Expand Down

0 comments on commit 6101b14

Please sign in to comment.