فهرست منبع

fixed mailto: links on home

bach 3 سال پیش
والد
کامیت
1bdacc98ff

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


BIN
web/themes/custom/materiotheme/assets/dist/main.js.gz


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
web/themes/custom/materiotheme/assets/dist/report.html


+ 17 - 12
web/themes/custom/materiotheme/vuejs/components/Pages/Home.vue

@@ -123,21 +123,26 @@ export default {
     },
     onClickLink(e){
       console.log("onClickLink", e, this.$router, this.$route)
-      let path = null;
-      // find existing router route compared with link href
-      for (let i = 0; i < this.$router.options.routes.length; i++) {
-        if (this.$router.options.routes[i].path == e.originalTarget.pathname) {
-          if (e.originalTarget.pathname !== this.$route.path) {
-            path = e.originalTarget.pathname
+      if (e.originalTarget.protocol == "mailto:") {
+        // https://stackoverflow.com/questions/10172499/mailto-using-javascript
+        window.location.href = e.originalTarget.href
+      }else {
+        let path = null;
+        // find existing router route compared with link href
+        for (let i = 0; i < this.$router.options.routes.length; i++) {
+          if (this.$router.options.routes[i].path == e.originalTarget.pathname) {
+            if (e.originalTarget.pathname !== this.$route.path) {
+              path = e.originalTarget.pathname
+            }
+            break
           }
-          break
         }
-      }
 
-      if (path) {
-        this.$router.push({
-          path: path
-        })
+        if (path) {
+          this.$router.push({
+            path: path
+          })
+        }
       }
     },
     onClickFieldLabel(e){

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است