Files
FiDA_Front/src/components/Canvas/DepthCanvas/index.vue

46 lines
923 B
Vue
Raw Normal View History

2026-03-06 15:50:05 +08:00
<template>
2026-03-17 11:06:32 +08:00
<fullscreen-dialog v-model="dialogVisible" @close="onClose" hide-destroy>
2026-03-06 15:50:05 +08:00
<div class="canvas-box">
2026-03-17 11:35:04 +08:00
<depth-canvas :config="config" @workbench="onWorkbench" />
2026-03-06 15:50:05 +08:00
</div>
</fullscreen-dialog>
</template>
<script setup lang="ts">
import FullscreenDialog from '../components/fullscreen-dialog.vue'
import depthCanvas from './depth-canvas.vue'
import { ref } from 'vue'
const dialogVisible = ref(false)
2026-03-17 09:56:58 +08:00
const config = ref({
2026-03-17 10:53:43 +08:00
id: '',
url: ''
2026-03-17 09:56:58 +08:00
})
2026-03-17 10:53:43 +08:00
2026-03-06 15:50:05 +08:00
const open = (options) => {
2026-03-17 10:53:43 +08:00
config.value = options
2026-03-06 15:50:05 +08:00
dialogVisible.value = true
}
2026-03-17 10:53:43 +08:00
// 工作区
const onWorkbench = (options) => {
dialogVisible.value = false
config.value.onWorkbench?.(options)
}
// 关闭
const onClose = () => {
2026-03-06 15:50:05 +08:00
dialogVisible.value = false
2026-03-17 10:53:43 +08:00
config.value.onClose?.()
2026-03-06 15:50:05 +08:00
}
2026-03-17 10:53:43 +08:00
2026-03-06 15:50:05 +08:00
defineExpose({
open,
close
})
</script>
<style lang="less" scoped>
.canvas-box {
padding-top: 10rem;
width: 100%;
height: 100%;
}
</style>