@univerjsuiindexclassesMenumanagerservice

@univerjs/ui v0.5.4


Class: MenuManagerService

Defined in: submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:51

Extends

Implements

Constructors

new MenuManagerService()

new MenuManagerService(_injector, _configService): MenuManagerService

Defined in: submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:181

Parameters

ParameterType
_injectorInjector
_configServiceIConfigService

Returns

MenuManagerService

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
menuChanged$readonlySubject<void>undefined-submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:52

Methods

appendRootMenu()

appendRootMenu(source): void

Defined in: submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:212

Parameters

ParameterType
sourceMenuSchemaType

Returns

void

Implementation of

IMenuManagerService.appendRootMenu


dispose()

dispose(): void

Defined in: submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:188

Returns

void

Overrides

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


getMenuByPositionKey()

getMenuByPositionKey(key): IMenuSchema[]

Defined in: submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:259

Get menu schema by position key

Parameters

ParameterType
keystring

Returns

IMenuSchema[]

Menu schema array or empty array if not found

Implementation of

IMenuManagerService.getMenuByPositionKey


mergeMenu()

mergeMenu(source, target?): void

Defined in: submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:197

Merge source menu to target menu recursively

Parameters

ParameterTypeDescription
sourceMenuSchemaType-
target?MenuSchemaTypedefault is root menu

Returns

void

Implementation of

IMenuManagerService.mergeMenu