| | |
| | | :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> |
| | | |
| | |
| | | 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"; |
| | |
| | | pageX: 0, |
| | | pageY: 0, |
| | | showWord: "", |
| | | prototype: "", |
| | | IPA: "", |
| | | translate: "", |
| | | keywordList: keyWordData |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, 500); |
| | | |
| | | // 测试页面跳转 |
| | | setTimeout(() => { |
| | | this.gotoPage(2, 18); |
| | | }, 500); |
| | | // setTimeout(() => { |
| | | // this.gotoPage(2, 18); |
| | | // }, 500); |
| | | |
| | | // const pageDom = (this.container ? this.container : document) |
| | | // .querySelector("#app") |
| | |
| | | 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) => { |