Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(uni): fix missing undo & redo menu item (#3343)

白熱15f18c80c2ae
diff --git a/packages-experimental/uniui/src/controllers/menu.schema.ts b/packages-experimental/uniui/src/controllers/menu.schema.ts
index 8924794d18..1373de39b2 100644
--- a/packages-experimental/uniui/src/controllers/menu.schema.ts
+++ b/packages-experimental/uniui/src/controllers/menu.schema.ts
@@ -15,6 +15,7 @@
*/
import type { MenuSchemaType } from '@univerjs/ui';
+import { RibbonStartGroup, menuSchema as UIMenuSchema } from '@univerjs/ui';
import { FONT_GROUP_MENU_ID } from '@univerjs/uniui';
import {
DELETE_MENU_ID,
@@ -53,6 +54,7 @@ import {
export const menuSchema: MenuSchemaType = {
[UNI_MENU_POSITIONS.TOOLBAR_MAIN]: {
+ ...(UIMenuSchema as any)[RibbonStartGroup.HISTORY],
[FAKE_FONT_FAMILY_MENU_ID]: {
menuItemFactory: FakeFontFamilySelectorMenuItemFactory,
},
diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts
index 3a43351dfc..0708aca395 100644
--- a/packages/ui/src/index.ts
+++ b/packages/ui/src/index.ts
@@ -102,9 +102,10 @@ export { DesktopZenZoneService } from './services/zen-zone/desktop-zen-zone.serv
export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';
export { UNI_DISABLE_CHANGING_FOCUS_KEY } from './const';
+export { menuSchema } from './controllers/menus/menu.schema';
+
export { IMenuManagerService, type MenuSchemaType, MenuManagerService } from './services/menu/menu-manager.service';
export {
-
MenuManagerPosition,
RibbonPosition,
RibbonStartGroup,
@@ -116,6 +117,7 @@ export {
ContextMenuGroup,
ContextMenuPosition,
} from './services/menu/types';
+export { type IMenuSchema } from './services/menu/menu-manager.service';
// #region - workbench components