perf(form->util): duplicate judge (#3865)

This commit is contained in:
Electrolux 2024-05-23 21:59:44 +08:00 committed by GitHub
parent e69dd1e223
commit dcba0ca837
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ export function setComponentRuleType(
} }
if (['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker'].includes(component)) { if (['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker'].includes(component)) {
rule.type = valueFormat ? 'string' : 'object'; rule.type = valueFormat ? 'string' : 'object';
} else if (['RangePicker', 'Upload', 'CheckboxGroup', 'TimePicker'].includes(component)) { } else if (['RangePicker', 'Upload', 'CheckboxGroup'].includes(component)) {
rule.type = 'array'; rule.type = 'array';
} else if (['InputNumber'].includes(component)) { } else if (['InputNumber'].includes(component)) {
rule.type = 'number'; rule.type = 'number';