深度画布保存接口

This commit is contained in:
lzp
2026-03-20 09:46:15 +08:00
parent 262e3e6c71
commit ecf928691e
5 changed files with 90 additions and 23 deletions

View File

@@ -89,16 +89,19 @@
globalStore.setLoading(true)
keyEventManager.registerEvents()
const url = props.config.url || ''
const json = props.config.json || ''
const canvasData = props.config.canvasData || ''
await canvasManager.initCanvas({
canvasRef,
canvasViewWidth: canvasContainerRef.value.clientWidth,
canvasViewHeight: canvasContainerRef.value.clientHeight,
canvasWidth: props.config.width || 750,
canvasHeight: props.config.height || 600,
url: json ? '' : url
url: canvasData ? '' : url
})
if (json) await canvasManager.loadJSON(json)
if (canvasData) {
const json = canvasManager.processCanvasDisUrlJSON(canvasData)
await canvasManager.loadJSON(json)
}
globalStore.setLoading(false)
stateManager.onMounted()