mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 03:38:41 +08:00
fix(components): [el-input-number]set value equal to min will update (#4650)
This commit is contained in:
parent
5beaf750f3
commit
59ea340e7e
@ -241,11 +241,11 @@ export default defineComponent({
|
|||||||
newVal = toPrecision(newVal, props.precision)
|
newVal = toPrecision(newVal, props.precision)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newVal !== undefined && newVal >= props.max) {
|
if (newVal !== undefined && newVal > props.max) {
|
||||||
newVal = props.max
|
newVal = props.max
|
||||||
emit('update:modelValue', newVal)
|
emit('update:modelValue', newVal)
|
||||||
}
|
}
|
||||||
if (newVal !== undefined && newVal <= props.min) {
|
if (newVal !== undefined && newVal < props.min) {
|
||||||
newVal = props.min
|
newVal = props.min
|
||||||
emit('update:modelValue', newVal)
|
emit('update:modelValue', newVal)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user