From 705e5f1b01f7059023f2ec94362bf895f6fdb1da Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Wed, 26 Feb 2025 10:59:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=83=E4=B8=8D?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index ad92c1e..57e996e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -196,7 +196,9 @@ const App: React.FC = () => { } useEffect(() => { document.addEventListener('keydown', (event) => { - if (event.key === 'F11') { + if (event.keyCode == 122) { + event.preventDefault(); + } else if (((event.ctrlKey && event.keyCode == 82) || event.keyCode == 116) && import.meta.env.VITE_ENV !== 'development') { event.preventDefault(); } });