Skip to content

Commit

Permalink
bugs: 崩溃重启,关闭devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
noneSycamore committed Apr 11, 2023
1 parent 03ee265 commit 51e68ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ app.whenReady().then(() => {
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
beforeExit()
app.quit()
app.relaunch() // 崩溃重启
}
})
app.on('before-quit', (event) => {
Expand Down Expand Up @@ -103,6 +103,7 @@ function createMainWindow () {
maximizable: false,
skipTaskbar: true,
webPreferences: {
devTools: false,
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false,
Expand Down Expand Up @@ -175,12 +176,14 @@ function createSetting () {
show: false,
maximizable: false,
webPreferences: {
devTools: false,
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false,
}
})
childWin.loadFile('./src/setting.html')
childWin.webContents.closeDevTools();
childWin.setFullScreenable(false);
// 设置窗口准备好后显示
childWin.once('ready-to-show', () => {
Expand Down

0 comments on commit 51e68ac

Please sign in to comment.