mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:32:51 +00:00
Merge branch 'main' into next
This commit is contained in:
commit
84523160b7
@ -272,7 +272,7 @@ export const MenuDesigner = () => {
|
||||
title: field.title,
|
||||
icon: field.componentProps.icon,
|
||||
};
|
||||
}, [field]);
|
||||
}, [field.title, field.componentProps.icon]);
|
||||
if (fieldSchema['x-component'] === 'Menu.URL') {
|
||||
schema.properties['href'] = urlSchema;
|
||||
schema.properties['params'] = paramsSchema;
|
||||
@ -364,7 +364,6 @@ export const MenuDesigner = () => {
|
||||
title: t('Delete menu item'),
|
||||
};
|
||||
}, [t]);
|
||||
|
||||
return (
|
||||
<GeneralSchemaDesigner>
|
||||
<SchemaSettingsModalItem
|
||||
|
@ -267,7 +267,6 @@ const HeaderMenu = ({
|
||||
},
|
||||
[schema, mode, onSelect, setLoading, setDefaultSelectedKeys],
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Component />
|
||||
@ -530,14 +529,14 @@ Menu.Item = observer(
|
||||
removeParentsIfNoChildren={false}
|
||||
>
|
||||
<Icon type={icon} />
|
||||
<span style={menuItemTitleStyle}>{t(field.title)}</span>
|
||||
<span style={menuItemTitleStyle}>{t(schema.title)}</span>
|
||||
<Designer />
|
||||
</SortableItem>
|
||||
</FieldContext.Provider>
|
||||
</SchemaContext.Provider>
|
||||
),
|
||||
};
|
||||
}, [field.title, icon, schema, Designer]);
|
||||
}, [schema.title, icon, schema, Designer]);
|
||||
|
||||
if (!pushMenuItem) {
|
||||
error('Menu.Item must be wrapped by GetMenuItemsContext.Provider');
|
||||
|
@ -35,12 +35,12 @@ export const CustomRequestInitializer: React.FC<any> = (props) => {
|
||||
const customRequestsResource = useCustomRequestsResource();
|
||||
const itemConfig = useSchemaInitializerItem();
|
||||
const { insert } = useSchemaInitializer();
|
||||
const schema = getNewSchema();
|
||||
|
||||
return (
|
||||
<SchemaInitializerItem
|
||||
{...itemConfig}
|
||||
onClick={async () => {
|
||||
const schema = getNewSchema();
|
||||
const s = merge(schema || {}, itemConfig.schema || {});
|
||||
itemConfig?.schemaInitialize?.(s);
|
||||
insert(s);
|
||||
|
Loading…
Reference in New Issue
Block a user