question:
In vue+element UI projects, it is often necessary to limit the input box to integers or decimals. Generally, it is similar to the following: ninput="value=value.replace(/^(\d*\.?\d{0,2} " Sometimes you find that your v-model is invalid. Such misoperation will cause various problems in your program, such as field validation, saving data that is not the last data you filled in, etc.
solve:
Reassign after input blur
If your input defines a blur event, you need to write the reassignment into the method.