Electron隐藏时返回窗口焦点 具体代码 具体代码 使用如下方式隐藏和显示窗口可以正确返回焦点到前一个窗口。 hide() { this.window.minimize(); this.window.hide(); if (process.platform == "darwin") this.app.hide() } show() { this.window.show(); this.window.restore(); }