最佳答案
根据方法的文档app.exit(exitCode) :
All windows will be closed immediately without asking user and the before-quit and will-quit events will not be emitted.
因此,在 OS X 上,应用程序及其菜单栏保持事件状态是很常见的。请尝试以下操作或将方法 app.exit()
更改为 app.quit()
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') {
app.quit();
}
});
关于javascript - 在Electron App中,app.quit()&&.exit(0)无法终止进程,如何处理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38653528/