element
el-input
does not support the v-model modifier, so the input content cannot be converted into a number through v-model.number. If you directly set the type of el-input to number, there will be a stepping arrow on the right side of the input box, which is very difficult. ugly.
In fact, you can add an blur
event to automatically convert the content to a number when the input box loses focus.
<el-input v-model="value" @blur="value=Number(value)"></el-input>