路由变化自动关闭深度画布
This commit is contained in:
@@ -21,7 +21,13 @@
|
|||||||
import { getDepthCanvas, saveDepthCanvas } from '@/api/depth-canvas'
|
import { getDepthCanvas, saveDepthCanvas } from '@/api/depth-canvas'
|
||||||
import FullscreenDialog from '../components/fullscreen-dialog.vue'
|
import FullscreenDialog from '../components/fullscreen-dialog.vue'
|
||||||
import depthCanvas from './depth-canvas.vue'
|
import depthCanvas from './depth-canvas.vue'
|
||||||
import { ref } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
const route = useRoute()
|
||||||
|
watch(
|
||||||
|
() => route.path,
|
||||||
|
() => dialogVisible.value && (dialogVisible.value = false)
|
||||||
|
)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const config = ref({
|
const config = ref({
|
||||||
canvasId: '',
|
canvasId: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user