Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-07-15 19:23:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9c3ac977535729753584d1c86ddcd81deaeb63aa
9c3ac977
1 parent
302cf1c9
fix 修复数字控件保留小数位校验不准确问题影响提交
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
src/components/NumberField/index.vue
src/components/NumberField/index.vue
View file @
9c3ac97
...
...
@@ -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;
...
...
Please
register
or
login
to post a comment