zhongshujie
2024-10-23 b4eb53d0f04c39abb07885c153fd2164f60ff1ed
src/books/civilAviation/view/components/index.vue
@@ -1,10 +1,10 @@
<template>
  <div class="page-main"  @scroll="throttledScrollHandler">
  <div class="page-main" @scroll="throttledScrollHandler">
    <div id="searchDomBox" style="display: none">
      <div id="searchContent"></div>
    </div>
    <div class="page-content" :style="{
      fontSize: fontSize ? fontSize + 'px' : '16px',
      fontSize: fontSize ? fontSize + 'px' : '18px',
      transform: `scale(${pageZoom ? pageZoom : 1})`,
      transformOrigin: 'center top',
    }">
@@ -46,6 +46,7 @@
  },
  computed: {
    fontSize() {
      this.transformDom(this.$store.state.qiankun.fontSize)
      return this.$store.state.qiankun.fontSize;
    },
    pageZoom() {
@@ -94,6 +95,7 @@
    // 默认加载章节
    this.showCatalogList = [1];
    // 滚动监听节流
    debugger
    this.throttledScrollHandler = _.throttle(
      this.scrollFun,
      this.throttleThreshold,
@@ -207,6 +209,9 @@
          currentScrollTop >=
          event.target.scrollHeight - this.loadThreshold
        ) {
          console.log(1);
          debugger
          // 到达阈值
          if (
            this.showCatalogList[this.showCatalogList.length - 1] <
@@ -905,6 +910,13 @@
          playVudio.requestPictureInPicture();
        }
      }
    },
    //其他类名下字体大小变化
    transformDom(fs) {
      const blockElement = this.$refs.blockElement;
      if (blockElement) {
        blockElement.style.fontSize = fs; // 或者你想要的任何大小
      }
    }
  },
  components: {