auto-save 2026-05-27 14:58 (+2, ~2)

This commit is contained in:
2026-05-27 14:58:42 +08:00
parent 3c146d64a0
commit 284296d3e9
4 changed files with 313 additions and 6 deletions

View File

@@ -639,6 +639,12 @@ const pendingVideoNodes = () => nodes.value.filter(node =>
node.type === 'video' && node.data?.taskId && !node.data?.url
)
const persistVideoSyncResult = () => {
window.setTimeout(() => {
saveProject()
}, 0)
}
const syncPendingVideoNodes = async () => {
const pending = pendingVideoNodes()
if (!pending.length) return
@@ -663,6 +669,7 @@ const syncPendingVideoNodes = async () => {
syncError: '',
updatedAt: Date.now()
})
persistVideoSyncResult()
window.$message?.success('视频生成成功,已自动回填到画布')
return
}
@@ -677,6 +684,7 @@ const syncPendingVideoNodes = async () => {
syncError: '',
updatedAt: Date.now()
})
persistVideoSyncResult()
window.$message?.error(item.error || '视频生成失败')
return
}
@@ -702,6 +710,7 @@ const syncPendingVideoNodes = async () => {
syncError: '',
updatedAt: Date.now()
})
persistVideoSyncResult()
return
}