const {app, BrowserWindow,screen } = require('electron'); function createWindow() { let size = screen.getPrimaryDisplay().workAreaSize; let width = parseInt(size.width * 1); let height = parseInt(size.height * 1); // 创建浏览器窗口 let win = new BrowserWindow({ width: width, height: height, kiosk: false, frame: false }); // 加载index.html文件 win.loadFile('index.html'); // win.webContents.openDevTools() } app.on('ready', createWindow);