@yzw/bim-operator - v1.8.0 › Globals › "interface" › IContextMenu
右键菜单管理
- IContextMenu
▸ add(menuItems
: ContextMenuItem[], parentKey?
: string): any
Defined in src/interface.ts:316
添加菜单
Parameters:
Name | Type | Description |
---|---|---|
menuItems |
ContextMenuItem[] | 右键菜单项 |
parentKey? |
string | 父级key,为空时,重置所有菜单 |
Returns: any
▸ remove(menuKey
: string): any
Defined in src/interface.ts:321
移除右键菜单,如果又子菜单,也会被移除
Parameters:
Name | Type | Description |
---|---|---|
menuKey |
string | 菜单的key |
Returns: any
▸ render(): void
Defined in src/interface.ts:325
渲染菜单
Returns: void