优化tag全屏为页签内区域
This commit is contained in:
@@ -258,7 +258,10 @@ function updateArrowState() {
|
|||||||
|
|
||||||
function toggleFullscreen() {
|
function toggleFullscreen() {
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
document.documentElement.requestFullscreen()
|
const appMain = document.querySelector('.app-main')
|
||||||
|
if (appMain) {
|
||||||
|
appMain.requestFullscreen()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
document.exitFullscreen()
|
document.exitFullscreen()
|
||||||
}
|
}
|
||||||
@@ -266,6 +269,11 @@ function toggleFullscreen() {
|
|||||||
|
|
||||||
function onFullscreenChange() {
|
function onFullscreenChange() {
|
||||||
isFullscreen.value = !!document.fullscreenElement
|
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) {
|
function handleDropdownCommand(command) {
|
||||||
|
|||||||
Reference in New Issue
Block a user