From 70ee9677ce928215fcd81623aafb06df26408019 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Fri, 26 Jul 2024 17:59:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 2 -- src/App.tsx | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 46a22f5..6f5d471 100644 --- a/main.js +++ b/main.js @@ -81,7 +81,6 @@ function createTray() { label: '退出', click: async () => { await mainWindow.webContents.send('quit'); app.quit(); - mainWindow = null; }, // icon: iconPath, }, @@ -155,7 +154,6 @@ app.on('ready', () => { case 'quit': await mainWindow.webContents.send('quit'); app.quit(); - mainWindow = null; break; case 'maximize': mainWindow.maximize() diff --git a/src/App.tsx b/src/App.tsx index f06fb14..cd0bf27 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -81,6 +81,9 @@ const App: React.FC = () => { if ((event.ctrlKey || event.metaKey) && event.key === 'r') { event.preventDefault(); } + if (event.key === 'F11') { + event.preventDefault(); + } }); } window.addEventListener('resize', handleResize);