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

View File

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