Skip to content

Commit

Permalink
优化关闭窗口
Browse files Browse the repository at this point in the history
  • Loading branch information
xianyunleo committed Jan 26, 2024
1 parent 0b54992 commit b3ddef6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function onRunning() {
function onBeforeQuit() {
app.on('before-quit', () => {
MainWindow.forceQuit = true
if (is.dev) mainWindow.webContents.closeDevTools()
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/TitleBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const maximizeClick = () => {
}
const closeClick = () => {
mainWindow.hide()
mainWindow.close()
}
mainWindow.on('maximize', () => {
Expand Down

0 comments on commit b3ddef6

Please sign in to comment.