优化
This commit is contained in:
+11
-4
@@ -1,4 +1,4 @@
|
||||
import { app, BrowserWindow } from 'electron'
|
||||
import { app, BrowserWindow, Menu } from 'electron'
|
||||
import '../renderer/store'
|
||||
|
||||
/**
|
||||
@@ -19,13 +19,20 @@ function createWindow () {
|
||||
* Initial window options
|
||||
*/
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
useContentSize: true,
|
||||
width: 1920
|
||||
show: false,
|
||||
fullscreen: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.loadURL(winURL)
|
||||
|
||||
// 禁用默认菜单
|
||||
Menu.setApplicationMenu(null);
|
||||
mainWindow.maximize()
|
||||
mainWindow.show()
|
||||
mainWindow.on('closed', () => {
|
||||
mainWindow = null
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user