mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-23 19:37:44 +08:00
26 lines
540 B
JavaScript
26 lines
540 B
JavaScript
const { app, BrowserWindow } = require('electron')
|
|
|
|
const createWindow = () => {
|
|
const win = new BrowserWindow({
|
|
width: 1200,
|
|
height: 800,
|
|
frame: false,
|
|
titleBarStyle: 'hiddenInset'
|
|
})
|
|
|
|
win.loadURL('http://192.168.3.125:8080/#/workbenche')
|
|
|
|
app.on('activate', () => {
|
|
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
|
})
|
|
|
|
// win.webContents.openDevTools()
|
|
}
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow()
|
|
})
|
|
|
|
app.on('window-all-closed', () => {
|
|
if (process.platform !== 'darwin') app.quit()
|
|
}) |