@univerjs/ui v0.4.2 • Docs
Class: MenuService
Deprecated
Extends
Implements
Constructors
new MenuService()
new MenuService(
_shortcutService,
_menuManagerService,
_logService): MenuService
Parameters
Parameter | Type |
---|---|
_shortcutService | IShortcutService |
_menuManagerService | IMenuManagerService |
_logService | ILogService |
Returns
Overrides
Defined in
packages/ui/src/services/menu/menu.service.ts:67 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
_logService | readonly | ILogService | undefined | - | packages/ui/src/services/menu/menu.service.ts:70 (opens in a new tab) |
menuChanged$ | public | Observable <void > | undefined | - | packages/ui/src/services/menu/menu.service.ts:65 (opens in a new tab) |
Methods
addMenuItem()
addMenuItem(item, config): IDisposable
Parameters
Parameter | Type |
---|---|
item | IMenuItem |
config | MenuConfig |
Returns
Deprecated
Implementation of
Defined in
packages/ui/src/services/menu/menu.service.ts:81 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Overrides
Defined in
packages/ui/src/services/menu/menu.service.ts:75 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getMenuConfig()
getMenuConfig(id): null | MenuConfig
Parameters
Parameter | Type |
---|---|
id | string |
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
Parameter | Type |
---|---|
id | string |
Returns
null
| IMenuItem
Deprecated
Implementation of
Defined in
packages/ui/src/services/menu/menu.service.ts:198 (opens in a new tab)
getMenuItems()
getMenuItems(positions): IDisplayMenuItem<IMenuItem>[]
Parameters
Parameter | Type |
---|---|
positions | string |
Returns
Deprecated
Implementation of
Defined in
packages/ui/src/services/menu/menu.service.ts:170 (opens in a new tab)
setMenuConfigs()
setMenuConfigs(id, config): void
Parameters
Parameter | Type |
---|---|
id | string |
config | MenuConfig |
Returns
void
Deprecated
Defined in
packages/ui/src/services/menu/menu.service.ts:208 (opens in a new tab)
setMenuItem()
setMenuItem(item): void
Parameters
Parameter | Type |
---|---|
item | IMenuItem |
Returns
void
Deprecated
Implementation of
Defined in
packages/ui/src/services/menu/menu.service.ts:185 (opens in a new tab)