You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
530 B
JavaScript

const { contextBridge, ipcRenderer } = require("electron");
// const path = require("path");
// 安全暴露数据库操作方法
contextBridge.exposeInMainWorld("electronAPI", {
updateConfig: async (key, value) => {
return await ipcRenderer.invoke("update-config", key, value);
},
getConfig: async (key, value) => {
return await ipcRenderer.invoke("get-config", key, value);
},
bulkInsertSystemMessages: async messages => {
return await ipcRenderer.invoke("bulk-insert-system-messages", messages);
}
});