Skip to content

Commit 453ed90

Browse files
committed
v2.0.0: For Electron11.x version
1 parent 4753ce7 commit 453ed90

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Pure-Peace/vue-cli-electron-template?color=aa&label=Lightweight&logo=aa&logoColor=aa)
1111
![GitHub last commit](https://img.shields.io/github/last-commit/Pure-Peace/vue-cli-electron-template)
1212

13-
⭐ Using **vue-cli 4** and **Electron 8.x** built a modular desktop application template.
13+
⭐ Using **vue-cli 4** and **Electron 11.x** built a modular desktop application template.
1414

1515
The directory structure is clear and the main process (electron) is separated from the rendering process (vue), which is easy to extend and manage.
1616

@@ -23,6 +23,7 @@ Fast packaging, one-click multi-language switch. Use custom borderless windows,
2323

2424
- [v0.3.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/0.3.0): Old version. But some dependencies were upgraded and minor refactoring was done.
2525
- [v1.0.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/1.0.0): After refactoring. Clearer directory structure. Also fix the problem of tray setting icon under MacOS.
26+
- [v2.0.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/2.0.0): Electron 11.x version
2627

2728
### Detailed:
2829

README_ZH.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Pure-Peace/vue-cli-electron-template?color=aa&label=Lightweight&logo=aa&logoColor=aa)
1111
![GitHub last commit](https://img.shields.io/github/last-commit/Pure-Peace/vue-cli-electron-template)
1212

13-
⭐ 使用 **vue-cli 4****Electron 8.x** 构建的模块化的桌面应用程序模板。目录结构清晰,主进程(Electron)与渲染进程(Vue)分离,易于扩展和管理。
13+
⭐ 使用 **vue-cli 4****Electron 11.x** 构建的模块化的桌面应用程序模板。目录结构清晰,主进程(Electron)与渲染进程(Vue)分离,易于扩展和管理。
1414

1515
支持快速打包、一键多语言切换。使用自定义无边框窗口,已添加易用的**svg**图标插件,封装了**axios** (Api 接口资源与请求器分离)、**vuex****vue-router****vue-i18n** 和 全局总线 **bus**,开箱即用,项目极速启动。
1616

@@ -21,6 +21,7 @@
2121

2222
- [v0.3.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/0.3.0): 老版本。不过升级了一些依赖,进行了微小的重构。
2323
- [v1.0.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/1.0.0): 整体重构,目录结构更加清晰。同时修复 MacOS 下托盘设置图标的问题。
24+
- [v2.0.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/2.0.0): Electron 11.x 版本
2425

2526
### 详细说明:
2627

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-cli-electron-template",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",
@@ -30,11 +30,11 @@
3030
"@vue/eslint-config-standard": "^6.0.0",
3131
"axios": "^0.21.1",
3232
"babel-eslint": "^10.1.0",
33-
"electron": "^8.5.5",
33+
"electron": "^11.3.0",
3434
"eslint-plugin-import": "^2.22.1",
3535
"eslint-plugin-node": "^11.1.0",
3636
"eslint-plugin-promise": "^4.3.1",
37-
"eslint-plugin-standard": "^4.1.0",
37+
"eslint-plugin-standard": "^5.0.0",
3838
"eslint-plugin-vue": "^7.6.0",
3939
"eslint": "^7.20.0",
4040
"less-loader": "^5.0.0",

src/main/windows/mainWindow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class MainWindow {
4040
webPreferences: {
4141
/* 注意,这些设置有关程序的安全性,请谨慎使用!
4242
Note: these settings are related to the security of the program, please use it with caution! */
43-
43+
enableRemoteModule: true, // Electron 10.x起需要主动启用才可在渲染进程中使用remote / Electron 10.x and above need to be actively enabled in order to use remote in the rendering process
4444
webSecurity: false, // 设为false允许跨域 / Set to false to allow cross-domain requests
4545
nodeIntegration: true // 允许渲染进程使用node.js / node integration, allow renderer process use node.js!
4646
},

0 commit comments

Comments
 (0)