Environment
vue + elemntUI
related codes
https://codepen.io/eeeecw/pen...
specific situation
in the change
event of the input box, I modified the two-way help value of the input box, but it is not always displayed in the input box.
for example, in the above code, the input box does not support decimals. After each input, I will convert the number to an integer in the change
event, but the displayed value is still the original value
. But if you write a setTimeout
in the change
event to convert the number to an integer, you will successfully render the latest value. No, no, no.
Why is this? Seek the principle? Or is there a better solution?