@univerjs/ui v0.5.4


Class: FMenu

Defined in: submodules/univer/packages/ui/src/facade/f-menu-builder.ts:80

This is a build for adding a menu to Univer. Please notice that until the appendTo method is called, the menu item is not added to the UI. Please note that this menu cannot have submenus. If you want to have submenus, please use FSubmenu.

Extends

Constructors

new FMenu()

new FMenu(
   _item, 
   _injector, 
   _commandService, 
   _menuManagerService): FMenu

Defined in: submodules/univer/packages/ui/src/facade/f-menu-builder.ts:91

Parameters

ParameterType
_itemIFacadeMenuItem
_injectorInjector
_commandServiceICommandService
_menuManagerServiceIMenuManagerService

Returns

FMenu

Overrides

FBase.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_commandServicereadonlyICommandServiceundefined-submodules/univer/packages/ui/src/facade/f-menu-builder.ts:94
_disposedprotectedbooleanfalseFBase._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_injectorreadonlyInjectorundefined-submodules/univer/packages/ui/src/facade/f-menu-builder.ts:93
_menuManagerServicereadonlyIMenuManagerServiceundefined-submodules/univer/packages/ui/src/facade/f-menu-builder.ts:95
MenuManagerPositionstatictypeof MenuManagerPositionMenuManagerPosition-submodules/univer/packages/ui/src/facade/f-menu-builder.ts:83
RibbonPositionstatictypeof RibbonPositionRibbonPosition-submodules/univer/packages/ui/src/facade/f-menu-builder.ts:82
RibbonStartGroupstatictypeof RibbonStartGroupRibbonStartGroup-submodules/univer/packages/ui/src/facade/f-menu-builder.ts:81

Methods

appendTo()

appendTo(path): void

Defined in: submodules/univer/packages/ui/src/facade/f-menu-builder.ts:140

Append the menu to any menu position on Univer UI.

Parameters

ParameterTypeDescription
pathstringSome predefined path to append the menu.

Returns

void


dispose()

dispose(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109

Returns

void

Inherited from

FBase.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

FBase.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

FBase.ensureNotDisposed


extend()

static extend(source): void

Defined in: submodules/univer/packages/core/src/facade/f-base.ts:26

Parameters

ParameterType
sourceany

Returns

void

Inherited from

FBase.extend