API Reference
@univerjs
@univerjs/ui
classes
Contextmenuservice

@univerjs/ui v0.4.2Docs


Class: ContextMenuService

Extends

Implements

Constructors

new ContextMenuService()

new ContextMenuService(): ContextMenuService

Returns

ContextMenuService

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
disabledpublicbooleanfalse-packages/ui/src/services/contextmenu/contextmenu.service.ts:46 (opens in a new tab)

Accessors

visible

get visible(): boolean

Returns

boolean

Implementation of

IContextMenuService.visible

Defined in

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

Methods

disable()

disable(): void

Returns

void

Implementation of

IContextMenuService.disable

Defined in

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


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

packages/core/src/shared/lifecycle.ts:106 (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)


enable()

enable(): void

Returns

void

Implementation of

IContextMenuService.enable

Defined in

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


hideContextMenu()

hideContextMenu(): void

Returns

void

Implementation of

IContextMenuService.hideContextMenu

Defined in

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


registerContextMenuHandler()

registerContextMenuHandler(handler): IDisposable

Parameters

ParameterType
handlerIContextMenuHandler

Returns

IDisposable

Implementation of

IContextMenuService.registerContextMenuHandler

Defined in

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


triggerContextMenu()

triggerContextMenu(event, menuType): void

Parameters

ParameterType
eventIMouseEvent | IPointerEvent
menuTypestring

Returns

void

Implementation of

IContextMenuService.triggerContextMenu

Defined in

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


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