Ver código fonte

guidebook -> open new link

Timmy 1 ano atrás
pai
commit
f6132e7117

+ 7 - 1
hichina-main-front-mobile-first/src/pages/GuideIntroPage.vue

@@ -45,7 +45,7 @@
       >
         <div class="q-pa-md">
           <q-card
-            @click="gotoUrl(item.downloadUrl)"
+            @click="openGuidebookLink(item.downloadUrl)"
             class="guidebook-card cursor-pointer rounded-borders"
             @mouseenter="hoverFlag = true"
             @mouseleave="hoverFlag = false"
@@ -124,6 +124,11 @@ export default {
           console.error("Error:", err);
         });
     }
+    function openGuidebookLink(url) {
+      if (url) {
+        window.open(url, "_blank"); // Open the URL in a new tab
+      }
+    }
 
     onMounted(() => {
       logPv();
@@ -137,6 +142,7 @@ export default {
       sliders,
       tab: ref("lg"),
       guidebooks,
+      openGuidebookLink,
     };
   },
 };