diff --git a/packages/core/client/src/schema-component/antd/action/Action.Modal.tsx b/packages/core/client/src/schema-component/antd/action/Action.Modal.tsx index a04dc02fd..d67444c85 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Modal.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Modal.tsx @@ -15,7 +15,7 @@ const openSizeWidthMap = new Map([ export const ActionModal: ComposedActionDrawer = observer( (props) => { const { footerNodeName = 'Action.Modal.Footer', width, ...others } = props; - const { visible, setVisible, openSize = 'large', modalProps } = useActionContext(); + const { visible, setVisible, openSize = 'middle', modalProps } = useActionContext(); const actualWidth = width ?? openSizeWidthMap.get(openSize); const schema = useFieldSchema(); const field = useField(); diff --git a/packages/core/client/src/schema-component/antd/form-item/FormItem.Settings.tsx b/packages/core/client/src/schema-component/antd/form-item/FormItem.Settings.tsx index f3f9acae7..a26cc7e22 100644 --- a/packages/core/client/src/schema-component/antd/form-item/FormItem.Settings.tsx +++ b/packages/core/client/src/schema-component/antd/form-item/FormItem.Settings.tsx @@ -427,9 +427,7 @@ export const formItemSettings = new SchemaSettings({ { label: t('Middle'), value: 'middle' }, { label: t('Large'), value: 'large' }, ], - value: - fieldSchema?.['x-component-props']?.['openSize'] ?? - (fieldSchema?.['x-component-props']?.['openMode'] == 'modal' ? 'large' : 'middle'), + value: fieldSchema?.['x-component-props']?.['openSize'] ?? 'middle', onChange: (value) => { field.componentProps.openSize = value; fieldSchema['x-component-props'] = field.componentProps;