【发布时间】:2020-01-02 13:11:29
【问题描述】:
我怀疑如何将 reactjs 文件加载到新窗口中 单击电子反应样板中的按钮。
const handleVideoCall=()=>{
const remote=require('electron').remote;
const BrowserWindow=remote.BrowserWindow;
const win = new BrowserWindow({
height: 600,
width: 800,
});
win.loadFile(fileName);
}
handleVideoCall 是单击按钮时调用的方法。 FileName 是我需要打开的 reactjs 文件。 由于没有来自 react-electron-boilerplate 的文档,我被困住了。任何帮助都是可观的。
【问题讨论】:
-
你有什么问题?你想逐行解释这个确切的代码吗?