feat: 新增组件
This commit is contained in:
@@ -8,4 +8,18 @@ const handleSend = async (vue_params) => {
|
||||
contextBridge.exposeInMainWorld("myApi", {
|
||||
handleSend: handleSend,
|
||||
// 能暴露的不仅仅是函数,我们还可以暴露变量
|
||||
// 最小化
|
||||
windowMin: () => {
|
||||
ipcRenderer.send("window-min");
|
||||
},
|
||||
|
||||
// 最大化
|
||||
windowMax: () => {
|
||||
ipcRenderer.send("window-max");
|
||||
},
|
||||
|
||||
// 关闭窗口
|
||||
windowClose: () => {
|
||||
ipcRenderer.send("window-close");
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user