只能输入数字:
<el-input oninput ="value=value.replace(/[^0-9]/g,'')" placeholder="请输入">
只能输入数字和两位小数(多余小数点会去掉)
<el-input oninput="value=value.replace(/[^0-9.]/g,'').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')" placeholder="请输入">
标签:数字,element,输入框,plus,输入,小数 From: https://www.cnblogs.com/sixrookie/p/17339790.html