From c1128bf15035965d91b419d286266ad35946ffd7 Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 30 Apr 2022 14:26:57 +0800 Subject: [PATCH] fix: action open mode --- .../src/schema-component/antd/action/Action.Designer.tsx | 2 +- .../core/client/src/schema-component/antd/action/Action.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 f9fd5b855..d6461f84a 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 @@ -65,7 +65,7 @@ export const ActionDesigner = (props) => { { label: t('Drawer'), value: 'drawer' }, { label: t('Dialog'), value: 'modal' }, ]} - value={field.componentProps.openMode} + value={fieldSchema?.['x-component-props']?.['openMode']} onChange={(value) => { field.componentProps.openMode = value; fieldSchema['x-component-props']['openMode'] = value; diff --git a/packages/core/client/src/schema-component/antd/action/Action.tsx b/packages/core/client/src/schema-component/antd/action/Action.tsx index 244438be1..b0512128d 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.tsx @@ -69,7 +69,7 @@ export const Action: ComposedAction = observer((props: any) => { const { popover, confirm, - openMode, + // openMode, containerRefKey, component, useAction = useA, @@ -85,6 +85,7 @@ export const Action: ComposedAction = observer((props: any) => { const { run } = useAction(); const fieldSchema = useFieldSchema(); const designerProps = fieldSchema['x-designer-props']; + const openMode = fieldSchema?.['x-component-props']?.['openMode']; const renderButton = () => (