@univerjsuiindexclassesMenumanagerservice

@univerjs/ui v0.5.0-beta.1Docs


Class: MenuManagerService

Extends

Implements

Constructors

new MenuManagerService()

new MenuManagerService(_injector, _configService): MenuManagerService

Parameters

ParameterType
_injectorInjector
_configServiceIConfigService

Returns

MenuManagerService

Overrides

Disposable.constructor

Defined in

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

Properties

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

Methods

appendRootMenu()

appendRootMenu(source): void

Parameters

ParameterType
sourceMenuSchemaType

Returns

void

Implementation of

IMenuManagerService.appendRootMenu

Defined in

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


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

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


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getMenuByPositionKey()

getMenuByPositionKey(key): IMenuSchema[]

Get menu schema by position key

Parameters

ParameterType
keystring

Returns

IMenuSchema[]

Menu schema array or empty array if not found

Implementation of

IMenuManagerService.getMenuByPositionKey

Defined in

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


mergeMenu()

mergeMenu(source, target?): void

Merge source menu to target menu recursively

Parameters

ParameterTypeDescription
sourceMenuSchemaType-
target?MenuSchemaTypedefault is root menu

Returns

void

Implementation of

IMenuManagerService.mergeMenu

Defined in

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