设置窗口默认最大化、全屏(electron)

一、默认最大化

win = new BrowserWindow({show: false})
win.maximize()
win.show()

二、默认全屏

win = new BrowserWindow({fullscreen: true})

参考:

  1. https://electronjs.org/docs/api/browser-window#browserwindow-setfullscreen-flag
  2. https://github.com/electron/electron/issues/7076
  3. https://stackoverflow.com/questions/39062131/electron-set-fullscreen-onclick
posted @ 2018-12-11 09:47  _fn  阅读(32199)  评论(3编辑  收藏  举报