From 70bd639206fda165fc675824bfca4aba717780e2 Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Tue, 26 Aug 2025 13:29:16 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues/8738=E3=80=91componentProps?= =?UTF-8?q?=E6=98=AF=E5=87=BD=E6=95=B0=E6=97=B6=E8=8E=B7=E5=8F=96=E4=B8=8D?= =?UTF-8?q?=E5=88=B0valueType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecgboot-vue3/src/utils/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jeecgboot-vue3/src/utils/index.ts b/jeecgboot-vue3/src/utils/index.ts index 10a2f07a7..60413596c 100644 --- a/jeecgboot-vue3/src/utils/index.ts +++ b/jeecgboot-vue3/src/utils/index.ts @@ -116,7 +116,14 @@ export function getValueTypeBySchema(schema: FormSchema, formAction: FormActionT let valueType = 'string'; if (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; }