方法: 添加正则校验 <el-input v-model="inputValue" oninput="value=value.replace(/[^\d]/g,'')"> </el-input> 相关文章: