fix
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user