mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-04-26 14:36:56 +08:00
fix(example): fix open childWindow error
This commit is contained in:
parent
17142a9ec8
commit
a6d8b6febd
@ -101,13 +101,15 @@ ipcMain.handle('open-win', (event, arg) => {
|
||||
const childWindow = new BrowserWindow({
|
||||
webPreferences: {
|
||||
preload,
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
},
|
||||
})
|
||||
|
||||
if (app.isPackaged) {
|
||||
childWindow.loadFile(indexHtml, { hash: arg })
|
||||
} else {
|
||||
childWindow.loadURL(`${url}/#${arg}`)
|
||||
childWindow.loadURL(`${url}#${arg}`)
|
||||
// childWindow.webContents.openDevTools({ mode: "undocked", activate: true })
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user