<el-col :span="12">
<el-form-item label="产生量(吨)" prop="productAmount">
<el-input onkeyup="this.value = this.value.replace(/[^\d]/g,'');" v-model="dataForm.productAmount" placeholder="产生量(吨)" style="width: 200px"></el-input>
</el-form-item>
</el-col>
只需在el-input标签后面加上
表示,数字以外的所有字符替换为空
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');"