ee-core@v2.2.4 ipcrender

This commit is contained in:
gaoshuaixing
2023-06-29 17:32:44 +08:00
parent 26640b22a0
commit 5294f1fe6e
2 changed files with 11 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
const { ipcRenderer: ipc } = (window.require && window.require('electron')) || window.electron || {};
const Renderer = (window.require && window.require('electron')) || window.electron || {};
/**
* ipc
@@ -17,12 +17,17 @@ const { ipcRenderer: ipc } = (window.require && window.require('electron')) || w
* ipc.sendToHost(channel, ...args) - 消息会被发送到 host 页面上的 <webview> 元素
*/
/**
* ipc
*/
const ipc = Renderer.ipcRenderer || undefined;
/**
* 是否为EE环境
*/
const isEE = ipc ? true : false;
export {
ipc,
isEE
export default {
Renderer, ipc, isEE
}

View File

@@ -39,10 +39,10 @@
"author": "哆啦好梦, Inc <530353222@qq.com>",
"license": "Apache",
"devDependencies": {
"@electron/rebuild": "^3.2.13",
"debug": "^4.3.3",
"electron": "^21.4.4",
"electron-builder": "^23.6.0",
"@electron/rebuild": "^3.2.13",
"eslint": "^5.13.0",
"eslint-plugin-prettier": "^3.0.1",
"nodemon": "^2.0.16"
@@ -50,7 +50,7 @@
"dependencies": {
"better-sqlite3": "^8.4.0",
"dayjs": "^1.10.7",
"ee-core": "^2.2.3",
"ee-core": "^2.2.4",
"electron-updater": "^5.3.0",
"lodash": "^4.17.21"
}