mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
[bugfix] Stepper: wrong value when input is empty and min is zero (#2470)
This commit is contained in:
@@ -132,6 +132,11 @@ export default create({
|
|||||||
onBlur(event) {
|
onBlur(event) {
|
||||||
this.currentValue = this.range(this.currentValue);
|
this.currentValue = this.range(this.currentValue);
|
||||||
this.$emit('blur', event);
|
this.$emit('blur', event);
|
||||||
|
|
||||||
|
// fix edge case when input is empty and min is 0
|
||||||
|
if (this.currentValue === 0) {
|
||||||
|
event.target.value = this.currentValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user