refactor: 增加redo、undo画布动作监控并可显示保存按钮

This commit is contained in:
wangjiahao 2023-10-27 13:32:26 +08:00
parent 80211d8c84
commit 6314e75397

View File

@ -65,6 +65,7 @@ export const snapshotStore = defineStore('snapshot', {
deepCopy(this.snapshotData[this.snapshotIndex]) || getDefaultCanvasInfo()
// undo 是当前没有记录
this.snapshotPublish(componentSnapshot)
this.styleChangeTimes++
}
},
@ -73,6 +74,7 @@ export const snapshotStore = defineStore('snapshot', {
this.snapshotIndex++
const snapshotInfo = deepCopy(this.snapshotData[this.snapshotIndex])
this.snapshotPublish(snapshotInfo)
this.styleChangeTimes++
}
},
snapshotPublish(snapshotInfo) {