【发布时间】:2022-07-06 07:49:37
【问题描述】:
我有一个多窗口应用程序,所以我想知道主窗口的 myComponent.tsx 上是否关闭了子电子窗口。
electron.js
const childwindow= new BrowserWindow({
parent: mainWindow,
frame: false,
transparent: true,
resizable: false,
...
};
myComponent.tsx
const getChildStatus= ()=>{
if (childwindow === closed){... do something}
}
return (
<>
>
)
}```