瀏覽代碼

use relative path for a production build

Konstantin Ladutenko 5 年之前
父節點
當前提交
854a56499d
共有 3 個文件被更改,包括 21 次插入4 次删除
  1. 14 1
      vue-cli3-webapp/public/index.html
  2. 4 3
      vue-cli3-webapp/src/App.vue
  3. 3 0
      vue-cli3-webapp/vue.config.js

+ 14 - 1
vue-cli3-webapp/public/index.html

@@ -5,8 +5,21 @@
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width,initial-scale=1.0">
 <!--  <link rel="icon" href="<%= BASE_URL %>favicon.ico">-->
-
   <title>Mie calculator</title>
+  <!-- Yandex.Metrika counter -->
+  <script type="text/javascript" >
+    (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
+      m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
+    (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
+
+    ym(54984811, "init", {
+      clickmap:true,
+      trackLinks:true,
+      accurateTrackBounce:true
+    });
+  </script>
+  <noscript><div><img src="https://mc.yandex.ru/watch/54984811" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
+  <!-- /Yandex.Metrika counter -->
 </head>
 <body>
 

+ 4 - 3
vue-cli3-webapp/src/App.vue

@@ -342,19 +342,20 @@
             duration: 200,
             message: 'Simulation was started!',
             type: 'is-danger',
-            position: 'is-bottom-left',
+            position: 'is-top',
             });
           setTimeout(
                   () => {
                     this.runMie();
                     this.plotResults();
                     this.$buefy.notification.open({
+                      duration: 3000,
                       message: 'Finished!',
                       type: 'is-success',
-                      position: 'is-bottom-left',
+                      position: 'is-top',
                       })
                     ;
-                  }, 200);
+                  }, 20);
         },
         runMie: function () {
           let t0 = performance.now();

+ 3 - 0
vue-cli3-webapp/vue.config.js

@@ -0,0 +1,3 @@
+module.exports = {
+    publicPath: ''
+}