1
This commit is contained in:
@@ -53,10 +53,14 @@
|
||||
}
|
||||
})
|
||||
const onWorkbench = async () => {
|
||||
exportCanvasToImage(canvasManager.canvas).then((url) => {
|
||||
const { canvas, images } = canvasManager.getCanvasDisUrlJSON()
|
||||
emit('workbench', { url, canvas, images })
|
||||
})
|
||||
if (stateManager.historyIndex.value === 0) {
|
||||
emit('close')
|
||||
} else {
|
||||
exportCanvasToImage(canvasManager.canvas).then((url) => {
|
||||
const { canvas, images } = canvasManager.getCanvasDisUrlJSON()
|
||||
emit('workbench', { url, canvas, images })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 准备就绪
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
<template>
|
||||
<fullscreen-dialog v-model="dialogVisible" @close="onClose" hide-destroy>
|
||||
<fullscreen-dialog
|
||||
v-model="dialogVisible"
|
||||
@close="() => depthCanvasRef.onWorkbench()"
|
||||
hide-destroy
|
||||
>
|
||||
<div class="canvas-box">
|
||||
<depth-canvas ref="depthCanvasRef" :config="config" @workbench="onWorkbench" />
|
||||
<depth-canvas
|
||||
ref="depthCanvasRef"
|
||||
:config="config"
|
||||
@close="onClose"
|
||||
@workbench="onWorkbench"
|
||||
/>
|
||||
</div>
|
||||
</fullscreen-dialog>
|
||||
</template>
|
||||
@@ -62,9 +71,8 @@
|
||||
}
|
||||
// 关闭
|
||||
const onClose = () => {
|
||||
depthCanvasRef.value.onWorkbench()
|
||||
// dialogVisible.value = false
|
||||
// config.value.onClose?.()
|
||||
dialogVisible.value = false
|
||||
config.value.onClose?.()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user