feat:add context menu

This commit is contained in:
黄云飞
2021-12-18 20:00:18 +08:00
parent c87801cb5d
commit 80f671697d
15 changed files with 506 additions and 30 deletions
@@ -0,0 +1,15 @@
export interface IContextMenuContext {
editorHasSelection: boolean;
editorTextFocus: boolean;
isInTable: boolean;
}
export interface IRegisterContextMenu {
isDivider?: boolean;
icon?: string;
name?: string;
shortCut?: string;
when?: (payload: IContextMenuContext) => boolean;
callback?: Function;
childMenus?: IRegisterContextMenu[];
}