From b78e52c012f698838d0fbbe994073481fcd76ce6 Mon Sep 17 00:00:00 2001 From: Lasy <1255352506@qq.com> Date: Fri, 3 Apr 2020 11:57:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E6=AC=A1=E7=82=B9=E5=87=BB=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E8=A1=8C=E4=B8=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index b8f32024..33900686 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -67,7 +67,11 @@ function createWindow() { }) // 托盘 - tray = new Tray(isDev ? 'src/static/512x512.png' : path.join(global.__static, '512x512.png')) + tray = new Tray( + isDev + ? 'src/static/512x512.png' + : path.join(global.__static, '512x512.png'), + ) const contextMenu = Menu.buildFromTemplate([ { label: '退出', @@ -79,10 +83,8 @@ function createWindow() { tray.setToolTip('洛雪音乐助手') tray.setContextMenu(contextMenu) tray.on('click', () => { - mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show() - mainWindow.isVisible() - ? mainWindow.setSkipTaskbar(false) - : mainWindow.setSkipTaskbar(true) + mainWindow.show() + mainWindow.setSkipTaskbar(false) }) mainWindow.loadURL(winURL)