In the vue project, the input box only allows the input of numbers, and now I will record a method I use for reference!
1. Inline insertion οninput="value=value.replace(/[^0-9.]/g,'')"
<el-input v-model.number="ruleForm.sort" placeholder="请输入数字(限数字)" oninput="value=value.replace(/[^0-9.]/g,'')" />
2. Use the InputNumber counter of element-ui
<el-input-number v-model="num" :min="1" :max="10" label="描述文字"></el-input-number>