[bugfix] Swipe: unable to scroll page when opened (#3056)

This commit is contained in:
neverland
2019-03-26 21:21:15 +08:00
committed by GitHub
parent 49494c9021
commit 6101b14c76
4 changed files with 3 additions and 17 deletions

View File

@@ -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);
}
},