The number type is required for element-ui form validation

One, the phenomenon

Insert picture description here
Entering a number or the verification fails, because the default is a string, in order to convert into a number

Second, the solution

Just add a number modifier to v-model.
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_42349568/article/details/114286966