完善说明

This commit is contained in:
gsx
2024-07-17 18:10:01 +08:00
parent 24a9c74b92
commit ec07e5dfe6
2 changed files with 6 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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 {