mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-31 20:16:36 +08:00
Merge pull request #85 from jindaxuan/patch-2
chore: reomve useless code
This commit is contained in:
commit
bb14982c2d
@ -36,17 +36,6 @@ async function createWindow() {
|
|||||||
win.webContents.openDevTools()
|
win.webContents.openDevTools()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Communicate with the Renderer-process.
|
|
||||||
win.webContents.on('ipc-message', (_, channel, ...args) => {
|
|
||||||
switch (channel) {
|
|
||||||
case 'app.getPath':
|
|
||||||
win?.webContents.send('app.getPath', app.getPath(args[0]))
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Test active push message to Renderer-process
|
// Test active push message to Renderer-process
|
||||||
win.webContents.on('did-finish-load', () => {
|
win.webContents.on('did-finish-load', () => {
|
||||||
win?.webContents.send('main-process-message', new Date().toLocaleString())
|
win?.webContents.send('main-process-message', new Date().toLocaleString())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user