diff --git a/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts b/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts index 2a1c274b4..07d3be3c7 100644 --- a/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts +++ b/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts @@ -16,6 +16,8 @@ import { transformVariableValue } from '../../../../variables/utils/transformVar import { isSubMode } from '../../association-field/util'; import { isFromDatabase, useSpecialCase } from './useSpecialCase'; +const formilyVariable = ['record']; + /** * 用于解析并设置 FormItem 的默认值 */ @@ -47,6 +49,7 @@ const useParseDefaultValue = () => { useEffect(() => { if ( + (isVariable(fieldSchema.default) && formilyVariable.includes(getVariableName(fieldSchema.default))) || fieldSchema.default == null || isInSetDefaultValueDialog || isInFormDataTemplate ||