Ver código fonte

feat electron封装成桌面应用

Funny 3 anos atrás
pai
commit
4546dac226
2 arquivos alterados com 6 adições e 7 exclusões
  1. 3 4
      src/App.vue
  2. 3 3
      vue.config.js

+ 3 - 4
src/App.vue

@@ -2,8 +2,8 @@
   <div id="app">
     <router-view />
     <!-- 语音播报 -->
-    <iframe id="iframeDom" allow="autoplay" style="display:none" :src="src"></iframe>
-    <audio class="audio" ref="audio" :src="url" controls autoplay hidden>
+    <iframe id="iframeDom" allow="autoplay" style="display:none" :src="src" sandbox=""></iframe>
+    <audio class="audio" ref="audio" :src="url" controlsList="nodownload" controls autoplay hidden>
     </audio>
   </div>
 </template>
@@ -32,8 +32,7 @@ export default {
       openMsg: false,
     };
   },
-  created() {
-  },
+  created() {},
   mounted() {
     bus.$on("closeGetSoundMsg", () => {
       console.log("进来准备关闭新订单提醒声音了");

+ 3 - 3
vue.config.js

@@ -21,7 +21,7 @@ module.exports = {
       builderOptions: {
         // build配置在此处
         // options placed here will be merged with default configuration and passed to electron-builder
-        "productName": "XXX",
+        "productName": "liebao-web",
         "appId": "XXX",
         "mac": {
           "icon": "./static/image/desk-logo.ico"
@@ -34,7 +34,7 @@ module.exports = {
         },
         "nsis": {
           "oneClick": false,
-          "guid": "idea",
+          "guid": "猎豹AI",
           "perMachine": true,
           "allowElevation": true,
           "allowToChangeInstallationDirectory": true,
@@ -43,7 +43,7 @@ module.exports = {
           "installerHeaderIcon": "./static/image/desk-logo.ico",
           "createDesktopShortcut": true,
           "createStartMenuShortcut": true,
-          "shortcutName": "idea"
+          "shortcutName": "猎豹AI"
         }
       }
     }