feat(Swipe): add stop-propagation prop (#4972)

This commit is contained in:
neverland
2019-11-09 21:32:04 +08:00
committed by GitHub
parent 5040233234
commit aa0dfe8808
3 changed files with 14 additions and 8 deletions

View File

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