优化tag全屏为页签内区域

This commit is contained in:
RuoYi
2026-03-22 15:57:22 +08:00
parent 328924d787
commit a2f1bf6372

View File

@@ -258,7 +258,10 @@ function updateArrowState() {
function toggleFullscreen() {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen()
const appMain = document.querySelector('.app-main')
if (appMain) {
appMain.requestFullscreen()
}
} else {
document.exitFullscreen()
}
@@ -266,6 +269,11 @@ function toggleFullscreen() {
function onFullscreenChange() {
isFullscreen.value = !!document.fullscreenElement
const appMain = document.querySelector('.app-main')
if (appMain) {
appMain.style.backgroundColor = document.fullscreenElement ? '#fff' : ''
appMain.style.overflowY = document.fullscreenElement ? 'auto' : ''
}
}
function handleDropdownCommand(command) {