mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
feat(Swipe): add stop-propagation prop (#4972)
This commit is contained in:
@@ -46,6 +46,10 @@ export default createComponent({
|
||||
showIndicators: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
stopPropagation: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -169,7 +173,7 @@ export default createComponent({
|
||||
this.touchMove(event);
|
||||
|
||||
if (this.isCorrectDirection) {
|
||||
preventDefault(event, true);
|
||||
preventDefault(event, this.stopPropagation);
|
||||
this.move({ offset: this.delta });
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user