From 8d7755cbf480c6346e65c31ee422b5ddc4c1dc56 Mon Sep 17 00:00:00 2001 From: yunkexin <760754045@qq.com> Date: Mon, 25 May 2026 16:55:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8F=AF=E8=A7=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/Header.js | 92 ++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 58 deletions(-) diff --git a/src/layout/Header.js b/src/layout/Header.js index 9a23bc3..df25439 100644 --- a/src/layout/Header.js +++ b/src/layout/Header.js @@ -394,42 +394,6 @@ const NavOpton = (props) => { } }; const FullScreenOpton = (props) => { - const [showModal, setshowModal] = useState(false); - const getChildCount = (val) => { - setshowModal(val); - }; - const [fullScreen, setFullScreen] = useState(false); - const [originResizeFunc, setOriginResizeFunc] = useState(); - const escFunction = () => { - let isFull = !!( - document.fullscreen || - document.mozFullScreen || - document.webkitIsFullScreen || - document.webkitFullScreen || - document.msFullScreen - ); - if (isFull) { - // / - } else { - // requestFullScreenMethod(document.body); - setshowModal(false); - } - }; - useEffect(() => { - // 监听退出全屏事件 --- chrome 用 esc 退出全屏并不会触发 keyup 事件 - document.addEventListener('webkitfullscreenchange', escFunction); /* Chrome, Safari and Opera */ - document.addEventListener('mozfullscreenchange', escFunction); /* Firefox */ - document.addEventListener('fullscreenchange', escFunction); /* Standard syntax */ - document.addEventListener('msfullscreenchange', escFunction); /* IE / Edge */ - return () => { - //销毁时清除监听 - document.removeEventListener('webkitfullscreenchange', escFunction); - document.removeEventListener('mozfullscreenchange', escFunction); - document.removeEventListener('fullscreenchange', escFunction); - document.removeEventListener('MSFullscreenChange', escFunction); - }; - }, []); - if (window.navigator.userAgent.indexOf('Windows') < 1) { return
; } else { @@ -438,31 +402,11 @@ const FullScreenOpton = (props) => {