feat: 增加右键菜单功能及处理逻辑

This commit is contained in:
tnt group
2022-09-28 16:47:12 +08:00
parent e559ca928a
commit 634b5c2bea
10 changed files with 212 additions and 62 deletions
+10 -1
View File
@@ -2,6 +2,7 @@ import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.
import { EditCanvasType } from '@/store/modules/chartEditStore/chartEditStore.d'
// 操作类型枚举
export enum HistoryActionTypeEnum {
// 新增
ADD = 'add',
@@ -30,7 +31,15 @@ export enum HistoryActionTypeEnum {
// 解组
UN_GROUP = 'unGroup',
// 选择历史记录
SELECT_HISTORY = 'selectHistory'
SELECT_HISTORY = 'selectHistory',
// 锁定
LOCK = 'lock',
// 解除锁定
UNLOCK = 'unLock',
// 隐藏
HIDE = 'hide',
// 显示
SHOW = 'show'
}
// 对象类型
@@ -153,6 +153,10 @@ export const useChartHistoryStore = defineStore({
| HistoryActionTypeEnum.DOWN
| HistoryActionTypeEnum.UP
| HistoryActionTypeEnum.BOTTOM
| HistoryActionTypeEnum.LOCK
| HistoryActionTypeEnum.UNLOCK
| HistoryActionTypeEnum.HIDE
| HistoryActionTypeEnum.SHOW
) {
this.createStackItem(item, type, HistoryTargetTypeEnum.CHART)
},