From 59ea340e7e7f76dcab7673f11c3de9257e53cf7b Mon Sep 17 00:00:00 2001 From: Alan Wang Date: Tue, 7 Dec 2021 20:05:52 -0500 Subject: [PATCH] fix(components): [el-input-number]set value equal to min will update (#4650) --- packages/components/input-number/src/input-number.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/input-number/src/input-number.vue b/packages/components/input-number/src/input-number.vue index 90a5bcd7d3..605967315b 100644 --- a/packages/components/input-number/src/input-number.vue +++ b/packages/components/input-number/src/input-number.vue @@ -241,11 +241,11 @@ export default defineComponent({ newVal = toPrecision(newVal, props.precision) } } - if (newVal !== undefined && newVal >= props.max) { + if (newVal !== undefined && newVal > props.max) { newVal = props.max emit('update:modelValue', newVal) } - if (newVal !== undefined && newVal <= props.min) { + if (newVal !== undefined && newVal < props.min) { newVal = props.min emit('update:modelValue', newVal) }