ソースを参照

mod:打开新窗口的时候,打开调试工具

panqiuyao 9 ヶ月 前
コミット
4732c8b4a9
2 ファイル変更3 行追加1 行削除
  1. 2 0
      electron/controller/utils.js
  2. 1 1
      frontend/src/components/upload/index.vue

+ 2 - 0
electron/controller/utils.js

@@ -51,6 +51,8 @@ class UtilsController extends Controller {
     });
     win.loadURL(config.url); // 设置窗口的 URL
     // 监听窗口关闭事件
+
+    win.webContents.openDevTools(config.openDevTools);
     win.on('close', () => {
       delete this.app.electron[config.id]; // 删除窗口引用
     });

+ 1 - 1
frontend/src/components/upload/index.vue

@@ -126,7 +126,7 @@ function openImage(){
   clientStore.ipc.removeAllListeners(icpList.utils.openImage);
   clientStore.ipc.send(icpList.utils.openImage);
   clientStore.ipc.on(icpList.utils.openImage, async (event, result) => {
-    console.log(result.base64Image);
+
     filePath.value = result.filePath
     base64Image.value = result.base64Image
     clientStore.ipc.removeAllListeners(icpList.utils.openImage);