Skip to content

Commit

Permalink
Update index.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
MoNaiZi committed Apr 4, 2023
1 parent 66f59bb commit 6e38202
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/views/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,12 @@ export default defineComponent({
});
window.onbeforeunload = (e) => {
console.log("I do not want to be closed", e);
// 与通常的浏览器不同,会提示给用户一个消息框,
//返回非空值将默认取消关闭
//建议使用对话框 API 让用户确认关闭应用程序.
// ipcRenderer.send("closeWindow");
// e.returnValue = false;
ipcRenderer.send("closeWindow");
e.returnValue = false;
};
const that = this;
Expand Down

0 comments on commit 6e38202

Please sign in to comment.