Loading... 一般我们都需要自己建立窗口控制按钮,这时候我们就要单独写方法 首先要引入remote来获取当前窗口 ``` let { remote } = require('electron') ``` 以下是控制窗口的方法 ``` //关闭 remote.getCurrentWindow().close() //最小化 remote.getCurrentWindow().minimize() //还原 remote.getCurrentWindow().restore() //最大化 remote.getCurrentWindow().maximize() ``` Last modification:May 24th, 2020 at 03:01 pm © 允许规范转载 Support If you think my article is useful to you, please feel free to appreciate ×Close Appreciate the author Sweeping payments Pay by AliPay Pay by WeChat