The messagebox opened when i close the dashboardWindow but i can't get response === 0 to work. Samehow console.log("after message box"); already run even when there is no click on the buttons. How I can make the response work (return index button on messageBox)?
登录窗口关闭
推荐答案
请参考最新的 API 文档关于 dialog.showMessageBox:此方法返回一个 Promise 对象并且不再使用回调函数,就像在 Electron v5.xx 之前一样
Please refer to the most recent API doc about dialog.showMessageBox: this method returns a Promise object and doesn't make use of a callback function any more, like it used to until Electron v5.x.x.