Browse Source

bug 修复

lilei 3 years ago
parent
commit
7ee61e0bd1
2 changed files with 6 additions and 6 deletions
  1. 1 1
      package.json
  2. 5 5
      src/background.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "electron-jg-pro",
-  "version": "1.0.0",
+  "version": "1.0.1",
   "private": true,
   "scripts": {
     "serve": "vue-cli-service serve",

+ 5 - 5
src/background.js

@@ -52,12 +52,12 @@ async function createWindow() {
 	backgroundColor: '#211f1d',
 	fullscreen: false,
     webPreferences: {
-      webSecurity: true,
+	  webSecurity: false,
 	  enableRemoteModule: true,
-      // Use pluginOptions.nodeIntegration, leave this alone
-      // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
-      nodeIntegration: false,
-      contextIsolation: false,
+	  // Use pluginOptions.nodeIntegration, leave this alone
+	  // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
+	  nodeIntegration: true,
+	  contextIsolation: false,
 	  icon: `${__static}/app.ico`
     }
   })