From c89dd92d3272373fc2480c558ef427a63257bee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Thu, 9 Sep 2021 09:50:18 +0800 Subject: [PATCH] quit app when close all window --- src/main/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/index.ts b/src/main/index.ts index 5c2e7cd..d832da2 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -25,4 +25,7 @@ function bootstrap() { app.whenReady().then(bootstrap) -app.on('window-all-closed', () => { win = null }) +app.on('window-all-closed', () => { + win = null + app.quit() +})