实现基本信息的变更
This commit is contained in:
@@ -2,15 +2,11 @@ import { app, BrowserWindow } from 'electron'
|
||||
import {join} from "path";
|
||||
import './load-serialport'
|
||||
|
||||
|
||||
|
||||
function createWindow(page: String) {
|
||||
|
||||
const win = new BrowserWindow({
|
||||
fullscreen: true,
|
||||
frame: false,
|
||||
webPreferences: {
|
||||
// webSecurity: false,
|
||||
nodeIntegration: true,
|
||||
preload: join(__dirname, 'preload.js')
|
||||
}
|
||||
@@ -23,29 +19,13 @@ function createWindow(page: String) {
|
||||
win.loadFile(`dist/render/${page}.html`)
|
||||
win.webContents.openDevTools()
|
||||
}
|
||||
|
||||
// if (process.env.NODE_ENV === 'development') {
|
||||
// win.loadURL(`http://localhost:3000/?page=${page}`)
|
||||
// win.webContents.openDevTools()
|
||||
// } else {
|
||||
// win.loadFile(`dist/render/index.html?page=${page}`)
|
||||
// // win.loadURL(`file://${__dirname}/dist/render/index.html?page=${page}`);
|
||||
// win.webContents.openDevTools()
|
||||
// }
|
||||
}
|
||||
|
||||
function launch() {
|
||||
|
||||
createWindow('satellite-data-monitor-platform')
|
||||
createWindow('satellite-info-monitor-platform')
|
||||
createWindow('satellite-signal-monitor-platform')
|
||||
createWindow('satellite-state-monitor-platform')
|
||||
|
||||
|
||||
// createWindow('DataMonitorPage')
|
||||
// createWindow('InfoMonitorPage')
|
||||
// createWindow('SignalMonitorPage')
|
||||
// createWindow('StateMonitorPage')
|
||||
// createWindow('satellite-info-monitor-platform')
|
||||
// createWindow('satellite-signal-monitor-platform')
|
||||
// createWindow('satellite-state-monitor-platform')
|
||||
}
|
||||
|
||||
app.whenReady().then(launch)
|
||||
|
||||
Reference in New Issue
Block a user