一、BrowserWindow 类:创建并控制浏览器窗口。https://www.electronjs.org/zh/docs/latest/api/browser-window

// 在主进程中.
const { BrowserWindow } = require('electron')

const win = new BrowserWindow({ width: 800, height: 600 })

// Load a remote URL
win.loadURL('https://github.com')

// Or load a local HTML file
win.loadFile('index.html')

  注意:实例窗口加载 页面 有两个中加载方式,loadURL 和 loadFile

 

二、

相关文章:

  • 2022-12-23
  • 2022-01-21
  • 2021-07-18
  • 2021-09-27
  • 2021-06-20
  • 2022-01-25
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2021-04-07
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
相关资源
相似解决方案