Skip to content

Commit

Permalink
更新版本缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
more-strive committed Jun 27, 2024
1 parent 8cb936b commit d1a6fa8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store/modules/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ export const useTemplatesStore = defineStore('Templates', {
modifedElement() {
const [ canvas ] = useCanvas()
const { addHistorySnapshot } = useHistorySnapshot()
const result = canvas.tree.findOne(`#${CanvasTypes.WorkSpaceDrawType}`).toJSON()
const workspace = canvas.tree.findOne(`#${CanvasTypes.WorkSpaceDrawType}`)
if (!workspace) return
const result = workspace.toJSON()
this.templates[this.templateIndex] = result
addHistorySnapshot()
},
Expand Down

0 comments on commit d1a6fa8

Please sign in to comment.