默认窗口最大化

This commit is contained in:
朱浩 2024-10-19 17:33:11 +08:00
parent 6f35ad8a1a
commit 770a847e91
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,6 @@ function createMainWindow() {
frame: false, // 无边框
autoHideMenuBar: true,
maximizable: false,
fullscreen: true,
icon: join(__dirname, '../../resources/logo2.ico'),
...(process.platform === 'linux' ? { icon } : {}),
webPreferences: {
@ -138,6 +137,7 @@ function createMainWindow() {
// mainWindow.setAlwaysOnTop(true, "screen-saver") // 将窗口设置为顶层窗口
// mainWindow.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
mainWindow.maximize();
// 第三步: 开启remote服务
remote.enable(mainWindow.webContents)
}