@univerjs/ui v0.4.2 • Docs
Class: MenuManagerService
Extends
Implements
Constructors
new MenuManagerService()
new MenuManagerService(_injector, _configService): MenuManagerService
Parameters
Parameter | Type |
---|---|
_injector | Injector |
_configService | IConfigService |
Returns
Overrides
Defined in
packages/ui/src/services/menu/menu-manager.service.ts:181 (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) |
menuChanged$ | readonly | Subject <void > | undefined | - | packages/ui/src/services/menu/menu-manager.service.ts:52 (opens in a new tab) |
Methods
appendRootMenu()
appendRootMenu(source): void
Parameters
Parameter | Type |
---|---|
source | MenuSchemaType |
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
Defined in
packages/ui/src/services/menu/menu-manager.service.ts:188 (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)
getMenuByPositionKey()
getMenuByPositionKey(key): IMenuSchema[]
Get menu schema by position key
Parameters
Parameter | Type |
---|---|
key | string |
Returns
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
Parameter | Type | Description |
---|---|---|
source | MenuSchemaType | - |
target ? | MenuSchemaType | default is root menu |
Returns
void
Implementation of
Defined in
packages/ui/src/services/menu/menu-manager.service.ts:197 (opens in a new tab)