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