mirror of
https://gitcode.com/yangzongzhuan/RuoYi-Vue3.git
synced 2026-05-22 19:08:37 +00:00
优化tag全屏为页签内区域
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user