优化tag全屏为页签内区域
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user