Kaynağa Gözat

feat: update vite-use-electron version

chenhao 2 yıl önce
ebeveyn
işleme
cd3d07cfc7
4 değiştirilmiş dosya ile 7 ekleme ve 8 silme
  1. 0 1
      electron-builder.json5
  2. 2 2
      electron/main/main.ts
  3. 1 1
      package.json
  4. 4 4
      pnpm-lock.yaml

+ 0 - 1
electron-builder.json5

@@ -8,6 +8,5 @@
   files: ['dist/electron/**/*'],
   files: ['dist/electron/**/*'],
   win: {
   win: {
     target: 'portable',
     target: 'portable',
-    requestedExecutionLevel: 'highestAvailable',
   },
   },
 }
 }

+ 2 - 2
electron/main/main.ts

@@ -40,7 +40,7 @@ async function createWindow() {
       devTools: true,
       devTools: true,
       nodeIntegration: false,
       nodeIntegration: false,
       contextIsolation: true,
       contextIsolation: true,
-      webSecurity: true,
+      webSecurity: false,
       experimentalFeatures: true,
       experimentalFeatures: true,
       navigateOnDragDrop: false,
       navigateOnDragDrop: false,
       disableHtmlFullscreenWindowResize: false,
       disableHtmlFullscreenWindowResize: false,
@@ -62,7 +62,7 @@ async function createWindow() {
   })
   })
 
 
   if (app.isPackaged) {
   if (app.isPackaged) {
-    mainWin.loadFile(resolve(__dirname, '../../web/index.html'))
+    mainWin.loadURL('http://192.168.10.40:7200')
   } else {
   } else {
     installDevTool(VUEJS_DEVTOOLS)
     installDevTool(VUEJS_DEVTOOLS)
     process.env.WEB_DEV_INDEX_URL && mainWin.loadURL(process.env.WEB_DEV_INDEX_URL)
     process.env.WEB_DEV_INDEX_URL && mainWin.loadURL(process.env.WEB_DEV_INDEX_URL)

+ 1 - 1
package.json

@@ -62,7 +62,7 @@
     "vite": "^3.1.0",
     "vite": "^3.1.0",
     "vite-plugin-eslint": "^1.8.1",
     "vite-plugin-eslint": "^1.8.1",
     "vite-plugin-svg-icons": "^2.0.1",
     "vite-plugin-svg-icons": "^2.0.1",
-    "vite-use-electron": "^0.0.2",
+    "vite-use-electron": "0.0.3",
     "vue-tsc": "^0.40.13"
     "vue-tsc": "^0.40.13"
   },
   },
   "lint-staged": {
   "lint-staged": {

+ 4 - 4
pnpm-lock.yaml

@@ -40,7 +40,7 @@ specifiers:
   vite: ^3.1.0
   vite: ^3.1.0
   vite-plugin-eslint: ^1.8.1
   vite-plugin-eslint: ^1.8.1
   vite-plugin-svg-icons: ^2.0.1
   vite-plugin-svg-icons: ^2.0.1
-  vite-use-electron: ^0.0.2
+  vite-use-electron: 0.0.3
   vue: 3.2.40
   vue: 3.2.40
   vue-echarts: 6.2.3
   vue-echarts: 6.2.3
   vue-router: 4.1.5
   vue-router: 4.1.5
@@ -91,7 +91,7 @@ devDependencies:
   vite: 3.1.7_sass@1.55.0
   vite: 3.1.7_sass@1.55.0
   vite-plugin-eslint: 1.8.1_eslint@8.25.0+vite@3.1.7
   vite-plugin-eslint: 1.8.1_eslint@8.25.0+vite@3.1.7
   vite-plugin-svg-icons: 2.0.1_vite@3.1.7
   vite-plugin-svg-icons: 2.0.1_vite@3.1.7
-  vite-use-electron: 0.0.2_uwij3ykj22hhahnsqpf36t67vi
+  vite-use-electron: 0.0.3_uwij3ykj22hhahnsqpf36t67vi
   vue-tsc: 0.40.13_typescript@4.8.4
   vue-tsc: 0.40.13_typescript@4.8.4
 
 
 packages:
 packages:
@@ -5542,8 +5542,8 @@ packages:
       - supports-color
       - supports-color
     dev: true
     dev: true
 
 
-  /vite-use-electron/0.0.2_uwij3ykj22hhahnsqpf36t67vi:
-    resolution: {integrity: sha512-SJhXuIMtqEBZxaNef8WEyHl81eHdlgMp+LfFVsXrS1mVD6Yzl6CdB1T0btMHwRAUEDyaJ4POvN8KezJzY99vHQ==}
+  /vite-use-electron/0.0.3_uwij3ykj22hhahnsqpf36t67vi:
+    resolution: {integrity: sha512-Fhd5yHfz5QnDkCuCf+wRvmfUmYMwb184NU4RH3RX6xfN6ZlrkphqSF114SsdP3Quu9ZZ1lRKpArR2bhYwOqZuw==}
     peerDependencies:
     peerDependencies:
       electron: ^19.0.10
       electron: ^19.0.10
       vite: ^3.1.3
       vite: ^3.1.3