diff --git a/packages/core/client/src/schema-component/antd/kanban-v2/Kanban.Card.Designer.tsx b/packages/core/client/src/schema-component/antd/kanban-v2/Kanban.Card.Designer.tsx index b9e190d3a..ef1366c8a 100644 --- a/packages/core/client/src/schema-component/antd/kanban-v2/Kanban.Card.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/kanban-v2/Kanban.Card.Designer.tsx @@ -58,7 +58,7 @@ export const KanbanCardDesigner = (props: any) => { const { refresh } = useDesignable(); const field = useField(); const fieldSchema = useFieldSchema(); - const fields = useFormItemInitializerFields(); + const fields = useFormItemInitializerFields({ readPretty: true }); if (!designable) { return null; } diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts index e75076a8b..62ea70f8c 100644 --- a/packages/core/client/src/schema-initializer/utils.ts +++ b/packages/core/client/src/schema-initializer/utils.ts @@ -87,10 +87,11 @@ export const useTableColumnInitializerFields = () => { }); }; -export const useFormItemInitializerFields = () => { +export const useFormItemInitializerFields = (options?: any) => { const { name, fields } = useCollection(); const { getInterface } = useCollectionManager(); const form = useForm(); + const { readPretty = form.readPretty } = options || {}; return fields ?.filter((field) => field?.interface) ?.map((field) => { @@ -111,7 +112,7 @@ export const useFormItemInitializerFields = () => { component: 'CollectionFieldInitializer', remove: removeGridFormItem, schemaInitialize: (s) => { - interfaceConfig?.schemaInitialize?.(s, { field, block: 'Form', readPretty: form.readPretty }); + interfaceConfig?.schemaInitialize?.(s, { field, block: 'Form', readPretty }); }, schema, } as SchemaInitializerItemOptions; @@ -641,6 +642,7 @@ export const createKanbanBlockSchema = (options) => { properties: { card: { type: 'void', + 'x-read-pretty': true, 'x-decorator': 'BlockItem', 'x-component': 'KanbanV2.Card', 'x-designer': 'KanbanV2.Card.Designer',