API Reference
@univerjs
@univerjs/ui
classes
Menuservice

@univerjs/ui v0.4.2Docs


Class: MenuService

Deprecated

Extends

Implements

Constructors

new MenuService()

new MenuService(
   _shortcutService, 
   _menuManagerService, 
   _logService): MenuService

Parameters

ParameterType
_shortcutServiceIShortcutService
_menuManagerServiceIMenuManagerService
_logServiceILogService

Returns

MenuService

Overrides

Disposable.constructor

Defined in

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

Properties

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

Methods

addMenuItem()

addMenuItem(item, config): IDisposable

Parameters

ParameterType
itemIMenuItem
configMenuConfig

Returns

IDisposable

Deprecated

Implementation of

IMenuService.addMenuItem

Defined in

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


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

packages/ui/src/services/menu/menu.service.ts:75 (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)


getMenuConfig()

getMenuConfig(id): null | MenuConfig

Parameters

ParameterType
idstring

Returns

null | MenuConfig

Deprecated

Defined in

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


getMenuItem()

getMenuItem(id): null | IMenuItem

Parameters

ParameterType
idstring

Returns

null | IMenuItem

Deprecated

Implementation of

IMenuService.getMenuItem

Defined in

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


getMenuItems()

getMenuItems(positions): IDisplayMenuItem<IMenuItem>[]

Parameters

ParameterType
positionsstring

Returns

IDisplayMenuItem<IMenuItem>[]

Deprecated

Implementation of

IMenuService.getMenuItems

Defined in

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


setMenuConfigs()

setMenuConfigs(id, config): void

Parameters

ParameterType
idstring
configMenuConfig

Returns

void

Deprecated

Defined in

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


setMenuItem()

setMenuItem(item): void

Parameters

ParameterType
itemIMenuItem

Returns

void

Deprecated

Implementation of

IMenuService.setMenuItem

Defined in

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


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