Skip to content

Commit

Permalink
v2.0.0: For Electron11.x version
Browse files Browse the repository at this point in the history
  • Loading branch information
Pure-Peace committed Feb 21, 2021
1 parent 4753ce7 commit 453ed90
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
![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)
![GitHub last commit](https://img.shields.io/github/last-commit/Pure-Peace/vue-cli-electron-template)

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

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

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

- [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.
- [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.
- [v2.0.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/2.0.0): Electron 11.x version

### Detailed:

Expand Down
3 changes: 2 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
![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)
![GitHub last commit](https://img.shields.io/github/last-commit/Pure-Peace/vue-cli-electron-template)

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

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

Expand All @@ -21,6 +21,7 @@

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

### 详细说明:

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-cli-electron-template",
"version": "1.0.0",
"version": "2.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down Expand Up @@ -30,11 +30,11 @@
"@vue/eslint-config-standard": "^6.0.0",
"axios": "^0.21.1",
"babel-eslint": "^10.1.0",
"electron": "^8.5.5",
"electron": "^11.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^7.6.0",
"eslint": "^7.20.0",
"less-loader": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/main/windows/mainWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MainWindow {
webPreferences: {
/* 注意,这些设置有关程序的安全性,请谨慎使用!
Note: these settings are related to the security of the program, please use it with caution! */

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
webSecurity: false, // 设为false允许跨域 / Set to false to allow cross-domain requests
nodeIntegration: true // 允许渲染进程使用node.js / node integration, allow renderer process use node.js!
},
Expand Down

0 comments on commit 453ed90

Please sign in to comment.