@univerjs/ui v0.5.0-beta.1 • Docs
Class: MenuManagerService
Extends
Implements
Constructors
new MenuManagerService()
new MenuManagerService(_injector, _configService): MenuManagerService
Parameters
Parameter | Type |
---|---|
_injector | Injector |
_configService | IConfigService |
Returns
Overrides
Defined in
submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:181
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
menuChanged$ | readonly | Subject <void > | undefined | - | submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:52 |
Methods
appendRootMenu()
appendRootMenu(source): void
Parameters
Parameter | Type |
---|---|
source | MenuSchemaType |
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
Defined in
submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:188
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
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
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
Parameter | Type | Description |
---|---|---|
source | MenuSchemaType | - |
target ? | MenuSchemaType | default is root menu |
Returns
void
Implementation of
Defined in
submodules/univer/packages/ui/src/services/menu/menu-manager.service.ts:197