API Reference
@univerjs
@univerjs/ui
classes
Menumanagerservice

@univerjs/ui v0.4.2Docs


Class: MenuManagerService

Extends

Implements

Constructors

new MenuManagerService()

new MenuManagerService(_injector, _configService): MenuManagerService

Parameters

ParameterType
_injectorInjector
_configServiceIConfigService

Returns

MenuManagerService

Overrides

Disposable.constructor

Defined in

packages/ui/src/services/menu/menu-manager.service.ts:181 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
menuChanged$readonlySubject<void>undefined-packages/ui/src/services/menu/menu-manager.service.ts:52 (opens in a new tab)

Methods

appendRootMenu()

appendRootMenu(source): void

Parameters

ParameterType
sourceMenuSchemaType

Returns

void

Implementation of

IMenuManagerService.appendRootMenu

Defined in

packages/ui/src/services/menu/menu-manager.service.ts:212 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

packages/ui/src/services/menu/menu-manager.service.ts:188 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


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

packages/ui/src/services/menu/menu-manager.service.ts:259 (opens in a new tab)


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

packages/ui/src/services/menu/menu-manager.service.ts:197 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.