[bugfix] SwipeCell: should not prevent touchmove when opened (#3982)

This commit is contained in:
neverland 2019-07-27 10:24:51 +08:00 committed by GitHub
parent 96cb14f022
commit 15046888d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,12 @@ export default createComponent({
this.touchMove(event);
if (this.direction === 'horizontal') {
preventDefault(event, this.stopPropagation);
const shouldPrevent = !this.opened || this.deltaX * this.startOffset < 0;
if (shouldPrevent) {
preventDefault(event, this.stopPropagation);
}
this.swipeMove(this.deltaX + this.startOffset);
}
},