zhongshujie
2025-05-19 f489c412f7b0f7bf32d201bdbc6317c9c283e693
src/books/hotelEnglishTrainingBrochure2nd/view/components/index.vue
@@ -3,23 +3,14 @@
    <div id="searchDomBox" style="display: none">
      <div id="searchContent"></div>
    </div>
    <div
      class="page-content"
      :style="{
    <div class="page-content" :style="{
        fontSize: fontSize + 'px',
        transform: `scale(${pageZoom})`,
        transformOrigin: 'center top',
      }"
    >
      <pageHeader
        v-if="showCatalogList.indexOf(1) > -1"
        :showPageList="loadPageList"
      ></pageHeader>
      <chapterOne
        v-if="showCatalogList.indexOf(2) > -1"
        :showPageList="loadPageList"
        :interfaceQuestion="questionDataMap"
      ></chapterOne>
    }">
      <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader>
      <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList"
        :interfaceQuestion="questionDataMap"></chapterOne>
      <!-- <chapterTwo
          v-if="showCatalogList.indexOf(2) > -1"
          :showPageList="loadPageList"
@@ -38,12 +29,7 @@
              :interfaceQuestion="questionDataMap"
            ></chapterFive>  -->
    </div>
    <translateWord
      :pageX="pageX"
      :pageY="pageY"
      :showWord="showWord"
      v-if="showWord"
    />
    <translateWord :pageX="pageX" :pageY="pageY" :showWord="showWord" v-if="showWord" />
  </div>
</template>
@@ -199,7 +185,7 @@
    // 测试页面跳转
    setTimeout(() => {
      this.gotoPage(2, 6);
      this.gotoPage(2, 18);
    }, 500);
    // const pageDom = (this.container ? this.container : document)
@@ -972,10 +958,10 @@
        dom.onmouseenter = (event) => {
          if (this.showWord != event.target.innerText) {
            const rect = dom.getBoundingClientRect();
            this.pageX = event.pageX - rect.width;
            this.pageY = event.pageY + 20;
            this.pageX = rect.left;
            this.pageY = rect.top + rect.height;
            this.showWord = event.target.innerText;
            console.log(event);
            console.log(rect);
          }
        };
        dom.onmouseleave = (event) => {
@@ -1000,6 +986,10 @@
<style lang="less" scoped>
.page-main {
  width: 100% !important;
  height: 100% !important;
  overflow: auto;
  .page-content {
    max-width: 816px;
    min-width: 375px;