feat: 初始化项目

This commit is contained in:
DEV_DSW
2025-09-22 17:05:21 +08:00
parent 1347e31f83
commit 329fc3eb0e
21 changed files with 9462 additions and 1 deletions

11
preload/index.js Normal file
View File

@@ -0,0 +1,11 @@
const { contextBridge, ipcRenderer } = require("electron");
const handleSend = async (vue_params) => {
let fallback = await ipcRenderer.invoke("sent-event", vue_params);
return fallback;
};
contextBridge.exposeInMainWorld("myApi", {
handleSend: handleSend,
// 能暴露的不仅仅是函数,我们还可以暴露变量
});