From 4dbac496be8bd2ada7469ed9c48f21eb6b2b93de Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Tue, 2 Jan 2024 22:24:17 +0800 Subject: [PATCH] fix(client): detail block should support save as block template (#3303) * fix: detail block should support save as block template * test: detail block setting test --- .../details-multi-data/__e2e__/schemaSettings.test.ts | 2 +- .../src/schema-component/antd/form-v2/Form.Settings.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/modules/details-multi-data/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/details-multi-data/__e2e__/schemaSettings.test.ts index 346c6a25c9..bf8567e0cc 100644 --- a/packages/core/client/src/modules/details-multi-data/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/details-multi-data/__e2e__/schemaSettings.test.ts @@ -21,7 +21,7 @@ test.describe('multi data details block schema settings', () => { 'Edit block title', 'Set the data scope', 'Set default sorting rules', - 'Save as block template', + 'Save as template', 'Delete', ], }); diff --git a/packages/core/client/src/schema-component/antd/form-v2/Form.Settings.tsx b/packages/core/client/src/schema-component/antd/form-v2/Form.Settings.tsx index 939c38d82f..7ba1513466 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/Form.Settings.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/Form.Settings.tsx @@ -14,6 +14,7 @@ import { SchemaSettingsFormItemTemplate, SchemaSettingsDataScope, SchemaSettingsBlockTitleItem, + SchemaSettingsTemplate, } from '../../../schema-settings'; export const formSettings = new SchemaSettings({ @@ -277,8 +278,8 @@ export const formDetailsSettings = new SchemaSettings({ }, }, { - name: 'formItemTemplate', - Component: SchemaSettingsFormItemTemplate, + name: 'template', + Component: SchemaSettingsTemplate, useComponentProps() { const { name } = useCollection(); const fieldSchema = useFieldSchema();