fix(Stepper): fix mobile safari page scroll down issue (#7701)

This commit is contained in:
neverland 2020-12-07 20:36:00 +08:00 committed by GitHub
parent 52d882e9b2
commit e20cef22a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,6 +268,14 @@ export default createComponent({
preventDefault(event);
}
},
onMousedown(event) {
// fix mobile safari page scroll down issue
// see: https://github.com/youzan/vant/issues/7690
if (this.disableInput) {
event.preventDefault();
}
},
},
render() {
@ -315,6 +323,7 @@ export default createComponent({
onInput={this.onInput}
onFocus={this.onFocus}
onBlur={this.onBlur}
onMousedown={this.onMousedown}
/>
<button
vShow={this.showPlus}