fix(仪表板、数据大屏): 钉钉全屏问题修复

This commit is contained in:
wangjiahao
2025-03-04 17:54:08 +08:00
committed by 王嘉豪
parent 5cf8b85cf3
commit f7bb4a0926
2 changed files with 2 additions and 5 deletions

View File

@@ -22,7 +22,6 @@ import EmptyBackground from '../../empty-background/src/EmptyBackground.vue'
import LinkOptBar from '@/components/data-visualization/canvas/LinkOptBar.vue'
import { isDesktop } from '@/utils/ModelUtil'
import { isMobile } from '@/utils/utils'
import CanvasExtFullscreenBar from '@/components/visualization/CanvasExtFullscreenBar.vue'
const dvMainStore = dvMainStoreWithOut()
const { pcMatrixCount, curComponent, mobileInPc, canvasState, inMobile } = storeToRefs(dvMainStore)
const openHandler = ref(null)
@@ -505,8 +504,6 @@ defineExpose({
:canvas-style-data="canvasStyleData"
:component-data="baseComponentData"
></canvas-opt-bar>
<canvas-ext-fullscreen-bar :canvas-id="canvasId" :show-position="showPosition">
</canvas-ext-fullscreen-bar>
<template v-if="renderReady">
<ComponentWrapper
v-for="(item, index) in baseComponentData"

View File

@@ -46,9 +46,9 @@ const toggleFullscreen = () => {
}
}
// 针对钉钉windows版无法退出全屏问题 这里主动退出
const handleKeydown = event => {
console.log('FullScreen key: ' + event.key)
if (event.key === 'Escape') {
if (event.key === 'Escape' && document.fullscreenElement) {
document.exitFullscreen()
}
}