Skip to content

Commit 46cfcc9

Browse files
committed
feat: 隐藏应用程序菜单栏
1 parent e925757 commit 46cfcc9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

electron/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { app, BrowserWindow } = require('electron');
1+
const { app, BrowserWindow, Menu } = require('electron');
22
const path = require('path');
33
const net = require('net');
44

@@ -103,6 +103,9 @@ function createWindow() {
103103
}
104104
});
105105

106+
// 隐藏菜单栏
107+
Menu.setApplicationMenu(null);
108+
106109
// 检查端口是否被占用
107110
isPortInUse(PORT).then(async (inUse) => {
108111
if (!inUse) {

0 commit comments

Comments
 (0)