mirror of https://github.com/jeecgboot/jeecg-boot
【issues/8738】componentProps是函数时获取不到valueType
parent
d245ef3037
commit
70bd639206
|
@ -116,8 +116,15 @@ export function getValueTypeBySchema(schema: FormSchema, formAction: FormActionT
|
||||||
let valueType = 'string';
|
let valueType = 'string';
|
||||||
if (schema) {
|
if (schema) {
|
||||||
const componentProps = formAction.getSchemaComponentProps(schema);
|
const componentProps = formAction.getSchemaComponentProps(schema);
|
||||||
|
// update-begin--author:liaozhiyang---date:20250825---for:【issues/8738】componentProps是函数时获取不到valueType
|
||||||
|
if (isFunction(componentProps)) {
|
||||||
|
const result = componentProps(schema);
|
||||||
|
valueType = result?.valueType ?? valueType;
|
||||||
|
} else {
|
||||||
valueType = componentProps?.valueType ? componentProps?.valueType : valueType;
|
valueType = componentProps?.valueType ? componentProps?.valueType : valueType;
|
||||||
}
|
}
|
||||||
|
// update-end--author:liaozhiyang---date:20250825---for:【issues/8738】componentProps是函数时获取不到valueType
|
||||||
|
}
|
||||||
return valueType;
|
return valueType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue