您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index.js 688B

1234567891011121314151617181920212223
  1. //This is the way to include modules with Node.js, in this case the
  2. //Electron module.
  3. //You can learn more about importing modules by searching
  4. //information about "CommonJS" modules on the internet
  5. const { app, BrowserWindow } = require('electron')
  6. //Create our main windows, here you can set the initial size.
  7. const createWindow = () => {
  8. const win = new BrowserWindow({
  9. width: 800,
  10. height: 600,
  11. })
  12. //The HTML file that will be shown, we will create this file in the next section.
  13. win.setMenuBarVisibility(false)
  14. win.loadFile('index.html')
  15. }
  16. //This is our starting event, once "Ready", create our main window.
  17. app.whenReady().then(() => {
  18. createWindow()
  19. })