mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 02:41:46 +08:00
[improvement] Picker: stop propagation when touchmove in vertical direction (#4043)
This commit is contained in:
parent
77ff2bad0e
commit
24b3a05c76
@ -98,9 +98,13 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onTouchMove(event) {
|
onTouchMove(event) {
|
||||||
preventDefault(event);
|
|
||||||
this.moving = true;
|
this.moving = true;
|
||||||
this.touchMove(event);
|
this.touchMove(event);
|
||||||
|
|
||||||
|
if (this.direction === 'vertical') {
|
||||||
|
preventDefault(event, true);
|
||||||
|
}
|
||||||
|
|
||||||
this.offset = range(
|
this.offset = range(
|
||||||
this.startOffset + this.deltaY,
|
this.startOffset + this.deltaY,
|
||||||
-(this.count * this.itemHeight),
|
-(this.count * this.itemHeight),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user