From 44ef986febbdb447f8fa8e93faca068c522a8e06 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 8 Jan 2019 22:04:02 +0800 Subject: [PATCH] [bugfix] Stepper: wrong value when input is empty and min is zero (#2470) --- packages/stepper/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/stepper/index.vue b/packages/stepper/index.vue index 2d10a8fa4..e83b65285 100644 --- a/packages/stepper/index.vue +++ b/packages/stepper/index.vue @@ -132,6 +132,11 @@ export default create({ onBlur(event) { this.currentValue = this.range(this.currentValue); this.$emit('blur', event); + + // fix edge case when input is empty and min is 0 + if (this.currentValue === 0) { + event.target.value = this.currentValue; + } } } });