diff --git a/packages/core/client/src/block-provider/FormBlockProvider.tsx b/packages/core/client/src/block-provider/FormBlockProvider.tsx index 52006aed1e..76d59d0087 100644 --- a/packages/core/client/src/block-provider/FormBlockProvider.tsx +++ b/packages/core/client/src/block-provider/FormBlockProvider.tsx @@ -84,8 +84,8 @@ export const useFormBlockType = () => { }; export const useIsDetailBlock = () => { - const ctx = useActionContext(); - return !(ctx?.fieldSchema?.['x-acl-action'] === 'create' || ctx?.fieldSchema?.['x-action'] === 'create'); + const ctx = useFormBlockContext(); + return ctx.type === 'update'; }; export const FormBlockProvider = (props) => { diff --git a/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx b/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx index d2f46daf85..33a9dddb6e 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx @@ -663,7 +663,6 @@ export const actionSettingsItems: SchemaSettingOptions['items'] = [ name: 'linkageRules', Component: SchemaSettingsLinkageRules, useVisible() { - const fieldSchema = useFieldSchema(); const isAction = useLinkageAction(); const { linkageAction } = useSchemaToolbar(); return linkageAction || isAction; diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/PrintAction.Settings.tsx b/packages/plugins/@nocobase/plugin-action-print/src/client/PrintAction.Settings.tsx index 41eb82d821..182d6c7004 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/PrintAction.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/PrintAction.Settings.tsx @@ -3,7 +3,6 @@ import { ActionDesigner, useSchemaToolbar, SchemaSettingsLinkageRules, - useLinkageAction, useCollection, } from '@nocobase/client';