From 0673f7fe45966e537c4b6263dd7dfc8cbd1f5ad5 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期三, 21 五月 2025 17:37:55 +0800
Subject: [PATCH] 中药手册

---
 src/books/hotelEnglishTrainingBrochure2nd/view/components/index.vue |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/books/hotelEnglishTrainingBrochure2nd/view/components/index.vue b/src/books/hotelEnglishTrainingBrochure2nd/view/components/index.vue
index 9c63d98..e60699f 100644
--- a/src/books/hotelEnglishTrainingBrochure2nd/view/components/index.vue
+++ b/src/books/hotelEnglishTrainingBrochure2nd/view/components/index.vue
@@ -29,7 +29,8 @@
               :interfaceQuestion="questionDataMap"
             ></chapterFive>  -->
     </div>
-    <translateWord :pageX="pageX" :pageY="pageY" :showWord="showWord" v-if="showWord" />
+    <translateWord :pageX="pageX" :pageY="pageY" :showWord="showWord" :IPA="IPA" :prototype="prototype"
+      :translate="translate" v-if="showWord" />
   </div>
 </template>
 
@@ -44,6 +45,7 @@
 import NoteIcon from "@/assets/images/biji.png";
 // import getQuestionList from "@/assets/methods/examination";
 // import testData from "../../assets/examinationList";
+import keyWordData from "../../assets/englishKeyWords.js";
 import _ from "lodash";
 import Swiper from "swiper/bundle";
 import "swiper/swiper-bundle.css";
@@ -71,6 +73,10 @@
       pageX: 0,
       pageY: 0,
       showWord: "",
+      prototype: "",
+      IPA: "",
+      translate: "",
+      keywordList: keyWordData
     };
   },
   computed: {
@@ -184,9 +190,9 @@
     }, 500);
 
     // 娴嬭瘯椤甸潰璺宠浆
-    setTimeout(() => {
-      this.gotoPage(2, 18);
-    }, 500);
+    // setTimeout(() => {
+    //   this.gotoPage(2, 18);
+    // }, 500);
 
     // const pageDom = (this.container ? this.container : document)
     //   .querySelector("#app")
@@ -960,8 +966,14 @@
             const rect = dom.getBoundingClientRect();
             this.pageX = rect.left;
             this.pageY = rect.top + rect.height;
-            this.showWord = event.target.innerText;
-            console.log(rect);
+            this.keywordList.forEach((item) => {
+              if (item.name == event.target.innerText) {
+                this.showWord = item.name
+                this.prototype = item.prototype
+                this.IPA = item.IPA
+                this.translate = item.translate
+              }
+            });
           }
         };
         dom.onmouseleave = (event) => {

--
Gitblit v1.9.1