+
95
-

Electron如何读取本地文件并显示?

Electron如何读取本地文件并显示?

网友回复

+
15
-

在index.html中添加一个按钮,每按一次从本地读取一次文件:

<button id="btn1">按钮1</button>

修改preload.js:
// preload.js
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
window.addEventListener('DOMCon...

点击查看剩余70%

我知道答案,我要回答