<el-input v-model="form.profit" placeholder="请输入授权专利新增利润" @input="handleInput" clearable />/*** 不符合正则校验,清空*/const handleInput = () => {if (form.value.profit) {if (!/^\d*\.?\d*$/.test(form.value.profit)) {// 把不符合正则的值删除,保留符合正则的值form.value.profit = form.value.profit.replace(/[^\d.]/g, "");}}};