hookehuyr

fix 修复数字控件保留小数位校验不准确问题影响提交

......@@ -146,7 +146,7 @@ const required = props.item.component_props.required;
const min = props.item.component_props.min;
const max = props.item.component_props.max;
const max_count = props.item.component_props.max_fraction_count; // 保留小数个数 null=不限,0=没有小数,大于0=最多只能输入的小数个数
const reg = new RegExp("^([0-9]+)(\\.(\\d){" + max_count +"," + max_count +"})$", "g");
const reg = new RegExp(`^\\d+(\\.\\d{${max_count}})?$`);
const validator = (val) => {
if (required && !val) { // 必填
return false;
......