소스 검색

添加窗口退出

xushining 3 년 전
부모
커밋
e29f53a379
2개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/components/TitleBar.vue
  2. 5 0
      vue.config.js

+ 2 - 1
src/components/TitleBar.vue

@@ -234,7 +234,8 @@ export default {
       done();
     },
     mainClose() {
-      //remote.getCurrentWindow().close();
+      const {remote} = require('electron');
+      remote.getCurrentWindow().destroy();
     }
   }
 };

+ 5 - 0
vue.config.js

@@ -1,5 +1,10 @@
 module.exports = {
     configureWebpack: {
       devtool: 'source-map'
+    },
+    pluginOptions:{
+      electronBuilder:{
+        nodeIntegration:true
+      }
     }
   }