mirror of
https://gitee.com/dromara/go-view.git
synced 2024-11-30 02:38:30 +08:00
fix: 优化历史记录性能
This commit is contained in:
parent
1b7bcd3e32
commit
b258b0f651
@ -39,12 +39,13 @@ export const useChartHistoryStoreStore = defineStore({
|
||||
actionType: HistoryActionTypeEnum,
|
||||
targetType: HistoryTargetTypeEnum = HistoryTargetTypeEnum.CHART
|
||||
) {
|
||||
this.pushBackStackItem({
|
||||
// 优化性能转为freeze
|
||||
this.pushBackStackItem(Object.freeze({
|
||||
[HistoryStackItemEnum.ID]: new Date().getTime().toString(),
|
||||
[HistoryStackItemEnum.HISTORY_DATA]: item,
|
||||
[HistoryStackItemEnum.ACTION_TYPE]: actionType,
|
||||
[HistoryStackItemEnum.TARGET_TYPE]: targetType
|
||||
})
|
||||
}))
|
||||
},
|
||||
// * 画布初始化
|
||||
canvasInit(canvas: EditCanvasType) {
|
||||
|
Loading…
Reference in New Issue
Block a user