I finally realized it with the attribute of precision (precision) + max (: max= "9999"). The change event mentioned above should also be implemented, but I think my method is better,
html native tag input has a maxlength attribute;
I use the el-input-number tag of the elementUI component library, which encapsulates input. Can I set the native properties of input through this component
below are the properties provided by the official display of this component
cannot use the following max attribute, because the value I entered may be a decimal,
value binding value number--
min sets the minimum allowed value of the counter number-- Infinity
max sets the maximum allowed value of the counter number-Infinity
step counter step size number-1
precision numerical precision number--
size counter size string large, Small-
disabled whether to disable the counter boolean-false
controls whether to use the control button boolean-true
controls-position control button position string right-
name native property string--
label text string associated with the label input box--