Files
WYF-koubo/electron/mapi/event/render.ts
T
2026-06-19 18:45:55 +08:00

23 lines
564 B
TypeScript

import { ipcRenderer } from "electron";
const init = () => {};
const send = (name: string, type: string, data: any = {}) => {
return ipcRenderer.invoke("event:send", name, type, data).then();
};
const callPage = async (name: string, type: string, data: any, option: any) => {
return ipcRenderer.invoke("event:callPage", name, type, data, option);
};
const channelSend = async (channel: string, data: any) => {
return ipcRenderer.invoke("event:channelSend", channel, data);
};
export default {
init,
send,
callPage,
channelSend,
};