优化tag全屏为页签内区域

This commit is contained in:
RuoYi
2026-03-22 16:01:27 +08:00
parent e3d59968b7
commit 13515f40b1
+11 -3
View File
@@ -258,16 +258,24 @@ function updateArrowState(): void {
}) })
} }
function toggleFullscreen(): void { function toggleFullscreen() {
if (!document.fullscreenElement) { if (!document.fullscreenElement) {
document.documentElement.requestFullscreen() const appMain = document.querySelector('.app-main') as HTMLElement
if (appMain) {
appMain.requestFullscreen()
}
} else { } else {
document.exitFullscreen() document.exitFullscreen()
} }
} }
function onFullscreenChange(): void { function onFullscreenChange() {
isFullscreen.value = !!document.fullscreenElement isFullscreen.value = !!document.fullscreenElement
const appMain = document.querySelector('.app-main') as HTMLElement
if (appMain) {
appMain.style.backgroundColor = document.fullscreenElement ? '#fff' : ''
appMain.style.overflowY = document.fullscreenElement ? 'auto' : ''
}
} }
function handleDropdownCommand(command: string): void { function handleDropdownCommand(command: string): void {