We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果form定义一个隐藏字段(show: false), 并且该字段为非string类型,则会遇到校验不通过的问题(系统认为类型错误)。
export const formSchema: FormSchema[] = [ { field: 'id', label: 'id', required: true, component: 'InputNumber', show: false, },
解决方案: 更改components\Form\src\components\FormItem.vue 将判断条件更改:
components\Form\src\components\FormItem.vue
function handleRules(): ValidationRule[] ... // if (rule.required && component) { // 版本中的 if (component) { // 更改后 if (!Reflect.has(rule, 'type')) { rule.type = 'string'; } ...
The text was updated successfully, but these errors were encountered:
237f41d
No branches or pull requests
Describe the bug
如果form定义一个隐藏字段(show: false), 并且该字段为非string类型,则会遇到校验不通过的问题(系统认为类型错误)。
Reproduction
解决方案:
更改
components\Form\src\components\FormItem.vue
将判断条件更改:
The text was updated successfully, but these errors were encountered: