Commit 237f41da68592ede236b722157c91f9d7b45db1b
1 parent
5c57a1dd
fix(form): ensure that the hidden fields of the form are verified properly, fix #413
Showing
4 changed files
with
12 additions
and
3 deletions
CHANGELOG.zh_CN.md
src/components/Form/src/components/FormItem.vue
... | ... | @@ -156,9 +156,9 @@ |
156 | 156 | if (!isShow) { |
157 | 157 | rule.required = false; |
158 | 158 | } |
159 | - if (rule.required && component) { | |
159 | + if (component) { | |
160 | 160 | if (!Reflect.has(rule, 'type')) { |
161 | - rule.type = 'string'; | |
161 | + rule.type = component === 'InputNumber' ? 'number' : 'string'; | |
162 | 162 | } |
163 | 163 | const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel') |
164 | 164 | ? rulesMessageJoinLabel | ... | ... |
src/design/ant/index.less
src/views/demo/form/RuleForm.vue