From 21acad7757dfe375fdbcdeb0da37850077aecbe8 Mon Sep 17 00:00:00 2001 From: kim131 <1035828775@qq.com> Date: Tue, 22 Dec 2020 16:32:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=89=98=E7=9B=98=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index 9b377d2..ba59a10 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -56,7 +56,10 @@ function createWindow() { // 创建系统通知区菜单 tray = new Tray(path.join(__dirname, 'file_word.png')); - const contextMenu = Menu.buildFromTemplate([ + const contextMenu = Menu.buildFromTemplate([ + {label: '最大化', click: () => { mainWindow.maximize()}}, + {label: '最小化', click: () => {mainWindow.minimize()}}, + {label: '还原', click: () => {mainWindow.restore()}}, {label: '退出', click: () => {mainWindow.destroy()}},//我们需要在这里有一个真正的退出(这里直接强制退出) ]) tray.setToolTip('LOCKING探索者')