refactor:internal context menu register

This commit is contained in:
黄云飞
2022-07-08 17:20:28 +08:00
parent 0b58e33258
commit 5f5eed207c
2 changed files with 9 additions and 7 deletions
+9 -1
View File
@@ -6,6 +6,9 @@ import { Command } from '../command/Command'
import { Draw } from '../draw/Draw'
import { Position } from '../position/Position'
import { RangeManager } from '../range/RangeManager'
import { globalMenus } from './menus/globalMenus'
import { imageMenus } from './menus/imageMenus'
import { tableMenus } from './menus/tableMenus'
interface IRenderPayload {
contextMenuList: IRegisterContextMenu[];
@@ -31,7 +34,12 @@ export class ContextMenu {
this.range = draw.getRange()
this.position = draw.getPosition()
this.container = draw.getContainer()
this.contextMenuList = []
// 内部菜单
this.contextMenuList = [
...globalMenus,
...tableMenus,
...imageMenus
]
this.contextMenuContainerList = []
this.contextMenuRelationShip = new Map()
// 接管菜单权限