Files
FiDA_Front/src/components/Canvas/DepthCanvas/index.vue
2026-03-17 09:56:58 +08:00

44 lines
931 B
Vue

<template>
<fullscreen-dialog v-model="dialogVisible" hide-destroy>
<div class="canvas-box">
<depth-canvas :config="config" @close="close" />
</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)
const config = ref({
width: 750,
height: 600,
})
const open = (options) => {
dialogVisible.value = true
// config.value = options || {}
const defaultConfig = {
canvasWidth: 750,
canvasHeight: 600,
canvasViewWidth: 750,
canvasViewHeight: 600,
}
config.value = { ...defaultConfig, ...options || {} }
}
const close = () => {
dialogVisible.value = false
}
defineExpose({
open,
close
})
</script>
<style lang="less" scoped>
.canvas-box {
padding-top: 10rem;
width: 100%;
height: 100%;
}
</style>