This is my minimal working example, the following example uses version 2.x of element UI which we are currently using in this project.
https://codepen.io/peter-peter-the-typescripter/pen/WNGxWEB
{{ input }}
<el-input-number placeholder="Please input" :value="input" @input="onInput" />
onInput(val) {
console.log('input', val)
this.input = val
this.$emit('input', val)
}
In previous version 1.x, input was able to emit value during on @change with little delay (few ms). However, it changes on v2.x. Can you tell me how to edit this code so it emits and validate the value almost immediately after I finish typing?
Is it possible to create similar behaviour what we had in version 1.x?
Check it here: https://element.eleme.io/1.4/#/en-US/component/input-number
Thank you.
Try this:
Instead of using
v-bind, just usev-modeland use native input event instead. According to this document, there is noinputevent, but onlychangeevent forel-input-numbertag.Link to their document: https://element.eleme.io/#/en-US/component/input-number#inputnumber