mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-06-13 03:11:10 +08:00
完善说明
This commit is contained in:
@@ -135,7 +135,7 @@ class AutoUpdaterAddon {
|
||||
*/
|
||||
sendStatusToWindow(content = {}) {
|
||||
const textJson = JSON.stringify(content);
|
||||
const channel = 'app.updater';
|
||||
const channel = 'custom.app.updater';
|
||||
const win = CoreWindow.getMainWindow();
|
||||
win.webContents.send(channel, textJson);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
/**
|
||||
* 主进程与渲染进程通信频道定义
|
||||
* 格式:控制器.文件名.方法
|
||||
* Definition of communication channels between main process and rendering process
|
||||
*/
|
||||
const ipcApiRoute = {
|
||||
@@ -64,12 +65,13 @@ const ipcApiRoute = {
|
||||
|
||||
/**
|
||||
* 自定义频道
|
||||
* 格式:自定义(推荐添加一个前缀)
|
||||
* custom chennel
|
||||
*/
|
||||
const specialIpcRoute = {
|
||||
appUpdater: 'app.updater', // updater channel
|
||||
window1ToWindow2: 'window1-to-window2', // windows channel
|
||||
window2ToWindow1: 'window2-to-window1', // windows channel
|
||||
appUpdater: 'custom.app.updater', // updater channel
|
||||
window1ToWindow2: 'custom.window1-to-window2', // windows channel
|
||||
window2ToWindow1: 'custom.window2-to-window1', // windows channel
|
||||
}
|
||||
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user