深度画布保存接口
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user