ZaiZai 1 year ago
parent
commit
330feb13ad
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/index.js

+ 3 - 1
src/main/index.js

@@ -83,9 +83,11 @@ app.whenReady().then(() => {
         event.preventDefault()
         if (process.platform === 'win32') {
             process.argv.push(url)
+            const argv = process.argv
+            const filePath = argv[argv.length - 1]
             BrowserWindow.getFocusedWindow().webContents.send('open-file-vue', {
                 data: 'win',
-                argv: process.argv,
+                argv: filePath,
             })
         } else {
             BrowserWindow.getFocusedWindow().webContents.send('open-file-vue', {