mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 10:56:35 +08:00
[bugfix] SwipeCell: should not prevent touchmove when opened (#3982)
This commit is contained in:
parent
96cb14f022
commit
15046888d9
@ -122,7 +122,12 @@ export default createComponent({
|
|||||||
this.touchMove(event);
|
this.touchMove(event);
|
||||||
|
|
||||||
if (this.direction === 'horizontal') {
|
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);
|
this.swipeMove(this.deltaX + this.startOffset);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user