We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbe04d3 commit cc9a69bCopy full SHA for cc9a69b
packages/input/src/index.vue
@@ -371,8 +371,8 @@
371
// hack for https://github.com/ElemeFE/element/issues/8548
372
// should remove the following line when we don't support IE
373
if (value === nativeInputValue.value) return
374
- const isNumber = (attrs.modelModifiers as anyObject)?.number
375
- const finalValue = value ? isNumber ? isNaN(parseFloat(value)) ? '' : parseFloat(value) : '' : ''
+ const isNumber = !!(attrs.modelModifiers as anyObject)?.number
+ const finalValue = isNumber ? isNaN(parseFloat(value)) ? '' : parseFloat(value) : value
376
emit('update:modelValue', finalValue)
377
emit('input', finalValue)
378
// ensure native input value is controlled
0 commit comments