This commit is contained in:
X1627315083@163.com
2026-03-19 17:14:57 +08:00
parent 4648416f13
commit 59a9c7c80f
3 changed files with 12 additions and 21 deletions

View File

@@ -63,8 +63,7 @@ export class StateManager {
this.mxHistory = ref(50)
this.historyList = ref([])
this.historyIndex = ref(0)
this.sketchId = options.sketchId
this.sketchId = ref(options.sketchId)
this.saveCanvasTimeInterval = 6000
this.saveCanvasTime = null
@@ -188,12 +187,12 @@ export class StateManager {
}
/** 画布数据存储 */
async exportFlow (time:number = 0){
if(!this.sketchId)return
if(!this.sketchId.value)return
clearTimeout(this.saveCanvasTime)
await new Promise((resolve) => {
this.saveCanvasTime = setTimeout(()=>{
putSketchFlowCanvas({
id: this.sketchId,
id: this.sketchId.value,
canvasData: JSON.stringify(this.nodes.value) }).then(() => {
resolve(true)
}).catch(() => {