|
|
@ -36,6 +36,9 @@ function genType() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export function setComponentRuleType(rule: Rule, component: ComponentType, valueFormat: string) { |
|
|
|
export function setComponentRuleType(rule: Rule, component: ComponentType, valueFormat: string) { |
|
|
|
|
|
|
|
if (Reflect.has(rule, 'type')) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
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', 'TimePicker'].includes(component)) |
|
|
|