mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-31 20:16:36 +08:00
修复渲染进程ipcrender.on无法使用的问题
This commit is contained in:
parent
cc9d182490
commit
d0133950e7
@ -16,7 +16,7 @@ contextBridge.exposeInMainWorld('fs', fs)
|
|||||||
contextBridge.exposeInMainWorld('removeLoading', removeLoading)
|
contextBridge.exposeInMainWorld('removeLoading', removeLoading)
|
||||||
contextBridge.exposeInMainWorld('ipcRenderer', {
|
contextBridge.exposeInMainWorld('ipcRenderer', {
|
||||||
...ipcRenderer,
|
...ipcRenderer,
|
||||||
on: (name: string, callback: () => {}) => {
|
on(...args: Parameters<IpcRenderer['on']>) {
|
||||||
ipcRenderer.on(name, callback)
|
return ipcRenderer.on(...args)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user