diff --git a/packages/core/client/src/schema-initializer/buttons/TableColumnInitializers.tsx b/packages/core/client/src/schema-initializer/buttons/TableColumnInitializers.tsx index 10f468802..06d96d0f8 100644 --- a/packages/core/client/src/schema-initializer/buttons/TableColumnInitializers.tsx +++ b/packages/core/client/src/schema-initializer/buttons/TableColumnInitializers.tsx @@ -8,12 +8,13 @@ import { useInheritsTableColumnInitializerFields, } from '../utils'; import { useCompile } from '../../schema-component'; -import { useFieldSchema } from '@formily/react'; +import { useField, useFieldSchema } from '@formily/react'; // 表格列配置 export const TableColumnInitializers = (props: any) => { const { items = [], action = true } = props; const { t } = useTranslation(); + const field = useField(); const fieldSchema = useFieldSchema(); const associatedFields = useAssociatedTableColumnInitializerFields(); const inheritFields = useInheritsTableColumnInitializerFields(); @@ -41,7 +42,7 @@ export const TableColumnInitializers = (props: any) => { ); }); } - if (associatedFields?.length > 0 && !isSubTable) { + if (associatedFields?.length > 0 && field.readPretty) { fieldItems.push( { type: 'divider',