闫增涛
2024-05-17 746a51d76ca615b98bf0a2883a1a3c1a2b63d414
Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout
1个文件已修改
19 ■■■■■ 已修改文件
src/books/childHealth/view/content/index.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/childHealth/view/content/index.vue
@@ -1,7 +1,12 @@
<template>
  <div class="page-main" @scroll="throttledScrollHandler">
    <div class="page-content" :style="{fontSize: fontSize ? fontSize + 'px' : '16px',
  transform: `scale(${pageZoom ? pageZoom : 1})`}">
    <div
      class="page-content"
      :style="{
        fontSize: fontSize ? fontSize + 'px' : '16px',
        transform: `scale(${pageZoom ? pageZoom : 1})`
      }"
    >
      <pageHeader v-if="showCatalogList.indexOf(0) > -1"></pageHeader>
      <chapterOne v-if="showCatalogList.indexOf(1) > -1"></chapterOne>
      <chapterTwo v-if="showCatalogList.indexOf(2) > -1"></chapterTwo>
@@ -51,12 +56,12 @@
      observer: null
    };
  },
  computed:{
  computed: {
    fontSize() {
      return this.$store.state.qiankun.fontSize
      return this.$store.state.qiankun.fontSize;
    },
    pageZoom() {
      return this.$store.state.qiankun.scale / 100
      return this.$store.state.qiankun.scale / 100;
    }
  },
  watch: {
@@ -277,7 +282,9 @@
      }
    },
    initObservation() {
      const sections = document.querySelectorAll(".page-box");
      const sections = (
        this.container ? this.container : document
      ).querySelectorAll(".page-box");
      //observer 观察每个元素,以便在它们进入或离开视窗时触发回调函数。
      sections.forEach((section) => {
        const isObserver = section.getAttribute("observer");