mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 新增图层
This commit is contained in:
+8
-1
@@ -42,15 +42,22 @@ export type MousePositionType = {
|
||||
[EditCanvasTypeEnum.Y]: number
|
||||
}
|
||||
|
||||
// 操作目标
|
||||
export type TargetChartType = {
|
||||
index: number
|
||||
}
|
||||
|
||||
// Store 类型
|
||||
export enum chartEditStoreEnum {
|
||||
EDITCANVAS = 'editCanvas',
|
||||
MOUSEPOSITION = 'mousePosition',
|
||||
COMPONENT_LIST = 'componentList'
|
||||
COMPONENT_LIST = 'componentList',
|
||||
TARGET_CHART = 'targetChart'
|
||||
}
|
||||
|
||||
export interface chartEditStoreType {
|
||||
[chartEditStoreEnum.EDITCANVAS]: EditCanvasType
|
||||
[chartEditStoreEnum.MOUSEPOSITION]: MousePositionType
|
||||
[chartEditStoreEnum.TARGET_CHART]: TargetChartType
|
||||
[chartEditStoreEnum.COMPONENT_LIST]: any[]
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@ export const useChartEditStoreStore = defineStore({
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
targetChart: {
|
||||
index: 0
|
||||
},
|
||||
componentList: []
|
||||
}),
|
||||
getters: {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
export interface HistoryStackType {
|
||||
|
||||
}
|
||||
|
||||
export interface chartHistoryStoreType {
|
||||
// 后退栈
|
||||
backStack: [],
|
||||
// 前进栈
|
||||
forwardStack: []
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { chartHistoryStoreType } from './chartHistoryStore.d'
|
||||
import { setLocalStorage, getLocalStorage } from '@/utils'
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
|
||||
export const useChartHistoryStoreStore = defineStore({
|
||||
id: 'useChartHistoryStore',
|
||||
state: (): chartHistoryStoreType => ({}),
|
||||
getters: {},
|
||||
actions: {}
|
||||
})
|
||||
Reference in New Issue
Block a user