zhongshujie
2024-11-06 eb811d2d0bb0e5df82b188e5ebb4c204f5a658a9
src/books/civilAviation/view/components/index.vue
@@ -10,6 +10,10 @@
    }">
      <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader>
      <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList"></chapterOne>
      <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList"></chapterTwo>
      <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList"></chapterThree>
      <chapterfour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList"></chapterfour>
      <chapterfive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList"></chapterfive>
    </div>
  </div>
</template>
@@ -17,6 +21,10 @@
<script>
import pageHeader from "./header.vue";
import chapterOne from "./chapter001.vue";
import chapterTwo from "./chapter002.vue";
import chapterThree from "./chapter003.vue";
import chapterfour from "./chapter004.vue";
import chapterfive from "./chapter005.vue"
import NoteIcon from "@/assets/images/biji.png";
import _ from "lodash";
import Swiper from "swiper/bundle";
@@ -27,7 +35,7 @@
  name: "pageContent",
  data() {
    return {
      catalogLength: 2, // 总章节数
      catalogLength: 6, // 总章节数
      showCatalogList: [], // 显示的章节
      loadThreshold: 300, // 触发加载阈值
      throttleThreshold: 100, // 节流阈值
@@ -151,8 +159,8 @@
    }, 500);
    // 测试页面跳转
    // setTimeout(() => {
    //   this.gotoPage(6, 30);
    setTimeout(() => {
      this.gotoPage(6,190);
    //   setTimeout(() => {
    //     this.renderSign("Highlight", {
    //       id: "2ACA9359",
@@ -166,7 +174,7 @@
    //     ids: ["2ACA9359"]
    //   });
    // }, 2000);
    // }, 500);
    }, 500);
    // const pageDom = (this.container ? this.container : document)
    //   .querySelector("#app")
@@ -706,6 +714,10 @@
      const pageData = {
        pageHeader,
        chapterOne,
        chapterTwo,
        chapterThree,
        chapterfour,
        chapterfive,
      };
      // 遍历所有章节文件
      for (const key in pageData) {
@@ -914,7 +926,6 @@
    },
    //其他类名下字体大小变化
    transformDom(fs) {
      console.log('字体大小',fs);
      if(!fs) return
      let doms = (
        this.container ? this.container : document
@@ -929,6 +940,10 @@
  components: {
    pageHeader,
    chapterOne,
    chapterTwo,
    chapterThree,
    chapterfour,
    chapterfive,
  },
};
</script>