From 5a7cbc6daa3ed4b399f6728f1846a03e30b4a0e3 Mon Sep 17 00:00:00 2001 From: dmy Date: Thu, 15 Jan 2026 00:45:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A6=81=E7=94=A8=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E4=BB=A5=E6=8F=90=E4=BE=9B=E6=9B=B4=E7=AE=80?= =?UTF-8?q?=E6=B4=81=E7=9A=84=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 Menu.setApplicationMenu(null) 来隐藏默认的 Electron 应用菜单,提升用户体验 --- app/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index 73e9344..4b6529e 100644 --- a/app/main.js +++ b/app/main.js @@ -1,4 +1,4 @@ -const { app, BrowserWindow, ipcMain } = require('electron'); +const { app, BrowserWindow, ipcMain, Menu } = require('electron'); const path = require('path'); const { spawn } = require('child_process'); const dotenv = require('dotenv'); @@ -141,6 +141,7 @@ function stopBackend() { app.on('ready', async () => { await startBackend(); createWindow(); + Menu.setApplicationMenu(null); }); // 所有窗口关闭时退出应用