zhongshujie
2025-05-20 1522cbb7d80fb3b6ab536ea55c935252beff626b
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) => {