Commit 1bafeb663826dc863ab3b1840d43c3893a3d2cd1
1 parent
fd57b83d
fix(fullscreen): fix judging full screen status, fixed #2281
Showing
1 changed file
with
7 additions
and
0 deletions
src/layouts/default/header/components/FullScreen.vue
... | ... | @@ -20,6 +20,13 @@ |
20 | 20 | setup() { |
21 | 21 | const { t } = useI18n(); |
22 | 22 | const { toggle, isFullscreen } = useFullscreen(); |
23 | + // 重新检查全屏状态 | |
24 | + isFullscreen.value = !!( | |
25 | + document.fullscreenElement || | |
26 | + document.webkitFullscreenElement || | |
27 | + document.mozFullScreenElement || | |
28 | + document.msFullscreenElement | |
29 | + ); | |
23 | 30 | |
24 | 31 | const getTitle = computed(() => { |
25 | 32 | return unref(isFullscreen) | ... | ... |