略略略

This commit is contained in:
lzp
2026-03-27 16:07:13 +08:00
parent 2aa5ac8044
commit 0be1c9743c
10 changed files with 129 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
import { ref, computed } from "vue";
import { ElMessageBox } from 'element-plus'
import { OperationType } from '../tools/layerHelper'
import i18n from '@/lang'
const t = i18n.global.t
@@ -95,6 +95,7 @@ export class StateManager {
this.running.value = true
this.historyIndex.value = index
this.canvasManager.loadJSON(state.canvas, false).then(() => {
this.toolManager.setTool(OperationType.SELECT)
this.event.emit('canvas:undo', state)
this.running.value = false
})
@@ -108,6 +109,7 @@ export class StateManager {
this.running.value = true
this.historyIndex.value = index
this.canvasManager.loadJSON(state.canvas, false).then(() => {
this.toolManager.setTool(OperationType.SELECT)
this.event.emit('canvas:redo', state)
this.running.value = false
})