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.
27 lines
532 B
27 lines
532 B
const { app, BrowserWindow } = require('electron')
|
|
|
|
const createWindow = () => {
|
|
const win = new BrowserWindow({
|
|
frame: false,
|
|
fullscreen: true,
|
|
// icon: path.join(__dirname, '/bb.png'), //这里指定图标
|
|
})
|
|
|
|
win.loadURL('http://127.0.0.1:9000')
|
|
}
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow()
|
|
|
|
app.on('activate', () => {
|
|
if (BrowserWindow.getAllWindows().length === 0) {
|
|
createWindow()
|
|
}
|
|
})
|
|
})
|
|
|
|
app.on('window-all-closed', () => {
|
|
if (process.platform !== 'darwin') {
|
|
app.quit()
|
|
}
|
|
}) |