当前位置:首页 > 英文周记 > 正文内容

electron「electronic arts」

更新时间:2026-07-18 00:57:23 周记网4年前 (2023-01-29)英文周记117

electron有必要学吗

有必要。

1、Electron是使用JavaScript,HTML和CSS构建跨平台的桌面应用程序框架。

2、Electron兼容Mac、Windows和Linux,可以构建出三个平台的应用程序,用途广泛。

electron「electronic arts」

electron是什么意思

electron的意思是:电子。

electron的复数是:electrons。

electron的相关短语有:electron microscope电子显微镜、electron beam电子束;电子注、scanning electron microscope扫描电子显微镜、tran**ission electron microscope透射式电子显微镜、electron diffraction电子衍射。

1、The energy of an electron is sufficient to excite the atom.

一个电子的能量已足以激发原子。

2、Integrated electron density along the line of sight.

视线的平均电子密度。

3、Other molecules are willing to accept a proton or give up an electron.

其它的分子要接收一个质子或放弃一个电子。

4、To use nitrate as electron donor in the electron transport chain during respiration.

利用硝酸盐作为呼吸作用中,电子传递链之电子提供者。

5、We aim to build a large plat of offering electron products and information.

优的目标是建立一个强大的综合游戏电子产品提供和资讯服务平台。

使用electron中遇到的问题总结

学习electron还没有太久,在项目上进一步接触打包和自动更新后也踩了好多坑,百度了很多的资料,我这里对遇到的问题整理一下,避免后续想学习electron的同学再次踩坑。

参考: 问题解决的参考文档

不同的页面引入报不一样的错,如下:

renderer进程引入electron (app.vue):

错误显示是node_modules/electron/index.js文件中引入fs.existsSync语句造成的

renderer进程引入electron (index.html页面):

百度查资料得知原因是:

(1)、首先在渲染进程属于浏览器端,没有集成Node的环境,所以类似 fs 这样的Node的基础包是不可以使用。

(2)、因为没有Node环境,所以这种属于node api的require关键词是不可以使用的。

(3)、electron5.x的node集成环境默认是关闭的,这之前的版本是默认开启的

根据百度提供的方案是在主进程中集成 Nodejs,也就是添加配置nodeIntegration: true

通过使用window.require代替require来引入electron,因为前者不会被webpack编译,在渲染进程require关键字就是表示node模块的系统

渲染进程:

主进程main.js:

配置好重新启动前端工程会之前的错误没有了,但是出现 window.require is not a function .错误

由此看出直接使用window.require代替require是不可行的,接着百度查找资料,找到一种解决方案:

2.1新建preload.js预处理文件

2.2在main进程中添加preload配置项,使用了预加载之后,即使nodeIntegration为false,也可以使用Node API访问到ipcRenderer

2.3 渲染进程种引入electron中的ipcRenderer

把以上三个步骤引入之后重启前端工程,又发现报错

不用担心,这个其实是因为工程是在本地浏览器运行的,识别不了electron中的api,只要保证在electron应用程序下运行就不会报错。我们一般开发都是在本地浏览器调试,有红色报错提示的话看着还是比较碍眼,所以添加一个 is-electron来判断,处于electron环境中才执行

npm install --save is-electron

electron副词形式

electron副词形式是electrically。electron是名词,意为电子。副词electrically意为“ 电力地;有关电地”。

词组短语:

electrically operated 电动操作的

electrically connected 电气性连接

electrically operated valve 电动阀

例句:

The electrically charged gas particles are affected by magnetic forces.

带电的气体粒子受磁力的影响。

electron短语:

electron microscope 电子显微镜

electron microscopy 电子显微镜学,电子显微镜

scanning electron microscope 扫描电子显微镜

例句:

An electron has a negative charge, a proton has a positive charge.

电子带负电荷,质子带正电荷。

标签: electron

“electron「electronic arts」” 的相关文章

electron「electronic翻译」

electron「electronic翻译」

electron是什么意思 electron的意思是:电子。electron的复数是:electrons。electron的相关短语有:electron microscope电子显微镜、electro...

electron「electronicpartner」

electron「electronicpartner」

electron副词形式 electron副词形式是electrically。electron是名词,意为电子。副词electrically意为“ 电力地;有关电地”。词组短语:electricall...

electron「electronic」

electron「electronic」

electron是什么软件?为什么突然出现在电脑里了? electron是电子。电子(electron)是带负电的微粒。它可以是自由的(不属于任何原子),也可以被原子核束缚。原子中的电子在各种各样的半...

electron「electronics」

electron「electronics」

electron如何解决白屏问题 electron白屏问题主要出现在两方面: 1、electron未加载完毕html,electron自身产生的白色背景; 2、electron加载html,html处...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。