mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56:36 +08:00
Merge pull request #288 from jaw52/fix/open_child_window
Fix/open child window
This commit is contained in:
commit
dfa7f855f9
3
.gitignore
vendored
3
.gitignore
vendored
@ -23,4 +23,7 @@ dist-ssr
|
||||
|
||||
release
|
||||
.vscode/.debug.env
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
yarn.lock
|
||||
dist-electron
|
||||
|
@ -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