mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:55:33 +00:00
refactor: the default openSize of dialog should be middle (#3569)
This commit is contained in:
parent
5bf7acdf66
commit
e6719763f6
@ -15,7 +15,7 @@ const openSizeWidthMap = new Map<OpenSize, string>([
|
||||
export const ActionModal: ComposedActionDrawer<ModalProps> = 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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user