You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
524 B
22 lines
524 B
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);
|