[improvement] Picker: stop propagation when touchmove in vertical direction (#4043)

This commit is contained in:
neverland 2019-08-03 21:28:26 +08:00 committed by GitHub
parent 77ff2bad0e
commit 24b3a05c76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,9 +98,13 @@ export default createComponent({
},
onTouchMove(event) {
preventDefault(event);
this.moving = true;
this.touchMove(event);
if (this.direction === 'vertical') {
preventDefault(event, true);
}
this.offset = range(
this.startOffset + this.deltaY,
-(this.count * this.itemHeight),