Pārlūkot izejas kodu

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

panqiuyao 9 mēneši atpakaļ
vecāks
revīzija
4732c8b4a9

+ 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);