From 60b5ecdcd7ea40d7a0a8793fba2073a6eb994090 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 17 Dec 2024 09:11:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=A8=E5=B1=8F=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=97=B6=E6=B7=B1=E8=89=B2=E7=9A=AE=E8=82=A4=E5=8F=8D=E8=89=B2?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/App.vue | 10 ++++++++++ resources/assets/js/functions/web.js | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index 8043648fc..4ee5b3c4a 100755 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -85,6 +85,7 @@ export default { window.addEventListener('resize', this.windowSizeListener) window.addEventListener('scroll', this.windowScrollListener) window.addEventListener('message', this.windowHandleMessage) + window.addEventListener('fullscreenchange', this.handleFullscreenchange); this.appInter = setInterval(this.appTimerHandler, 1000) $A.loadVConsole() }, @@ -93,6 +94,7 @@ export default { window.removeEventListener('resize', this.windowSizeListener) window.removeEventListener('scroll', this.windowScrollListener) window.removeEventListener('message', this.windowHandleMessage) + window.removeEventListener('fullscreenchange', this.handleFullscreenchange); this.appInter && clearInterval(this.appInter) }, @@ -293,6 +295,14 @@ export default { document.documentElement.setAttribute("data-platform", $A.isElectron ? "desktop" : $A.isEEUiApp ? "app" : "web") }, + handleFullscreenchange() { + if (document.fullscreenElement) { + $A("body").addClass("fullscreen-mode") + } else { + $A("body").removeClass("fullscreen-mode") + } + }, + /** * 获取链接打开方式 * @param url diff --git a/resources/assets/js/functions/web.js b/resources/assets/js/functions/web.js index 0a3413c1c..e8528e829 100755 --- a/resources/assets/js/functions/web.js +++ b/resources/assets/js/functions/web.js @@ -1047,7 +1047,11 @@ import {convertLocalResourcePath} from "../components/Replace/utils"; .no-dark-content [style*="background-image:url"], .no-dark-content [style*="background: url"], .no-dark-content [style*="background-image: url"], - .no-dark-content [background] { + .no-dark-content [background], + .fullscreen-mode img, + .fullscreen-mode video, + .fullscreen-mode iframe, + .fullscreen-mode canvas { ${this.utils.noneFilter()} }