ZhangXianQiang
2024-06-03 5eebeba2a160192d48344ab587e90faaf6135dd8
src/background.js
@@ -1,5 +1,5 @@
// src-electron/main.js
const { app, BrowserWindow } = require('electron');
const { app, BrowserWindow,screen  } = require('electron');
const { join } = require('path');
// 屏蔽安全警告
@@ -8,9 +8,12 @@
// 创建浏览器窗口时,调用这个函数。
const createWindow = () => {
    const {width, height} = screen.getPrimaryDisplay().bounds;
    const win = new BrowserWindow({
        width: 800,
        height: 600,
        width: width,
        height: height,
        minWidth: 1280,
        minHeight: 720,
    });
    // win.loadURL('http://localhost:3000')