use the custom verification rules in elementui"s form to check the input numbers, but when you delete using the Backoff / Delete key, the decimal point is deleted together. I don"t know why, but regular expressions can currently meet the verification requirements. I don"t know if regularities are relevant. The code is as follows
let fnArgCheckDutyPercent = (rule, value, callback) => {
let regDecimal = /^[\d{1,3}]+(\.\d{1,2})?$/;
if (!value) {
callback(new Error(""));
} else if (!regDecimal.test(value)) {
callback(new Error(""));
} else {
callback();
}
};
{ validator: fnArgCheckDutyPercent, trigger: "blur" }