mirror of
https://github.com/jeecgboot/jeecg-boot.git
synced 2025-09-01 18:17:29 +00:00
【issues/8738】componentProps是函数时获取不到valueType
This commit is contained in:
@@ -116,7 +116,14 @@ 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);
|
||||||
valueType = componentProps?.valueType ? componentProps?.valueType : valueType;
|
// 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;
|
||||||
|
}
|
||||||
|
// update-end--author:liaozhiyang---date:20250825---for:【issues/8738】componentProps是函数时获取不到valueType
|
||||||
}
|
}
|
||||||
return valueType;
|
return valueType;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user