From 4b1d6c1bf6b8958df4bdb8a886133d695b8e8895 Mon Sep 17 00:00:00 2001 From: kim131 <1035828775@qq.com> Date: Fri, 25 Dec 2020 10:29:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA=E6=A0=8F=E9=80=80=E5=87=BA?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=8C=89=E9=92=AE=20=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/index.js b/src/main/index.js index ba59a10..4ecc832 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -102,6 +102,12 @@ app.on('second-instance', (event, commandLine, workingDirectory) => { // code. You can also put them in separate files and require them here. // 监听必要的自定义事件 +/** + * 点击退出应用 + */ +ipcMain.handle('close-app', async (event, args) => { + mainWindow.destroy(); +}); /** * 项目中的文件上传 */