闫增涛
2024-05-14 7f568415400f30527e547fd018bf25b453171ac1
src/books/childHealth/view/content/index.vue
@@ -48,8 +48,18 @@
      loadThreshold: 300, // 触发加载阈值
      throttleThreshold: 100, // 节流阈值
      previousScrollTop: 0,
      throttledScrollHandler: null
      throttledScrollHandler: null,
    };
  },
  watch: {
    showCatalogList: {
      handler(newVal) {
        console.log("显示章节", newVal);
        this.$store.state.qiankun.windowSelection({
          showCatalogList: newVal,
        });
      },
    },
  },
  mounted() {
    // 默认加载章节
@@ -114,6 +124,7 @@
          }
        }
      }
      // showCatalogList 当前显示的三个章节,watch监听传递给主应用
      console.log(this.showCatalogList);
      // 更新上一次滚动的位置
      this.previousScrollTop = event.target.scrollTop;
@@ -160,8 +171,8 @@
    chapterTen,
    chapterEleven,
    chapterTwelve,
    chapterThirteen
  }
    chapterThirteen,
  },
};
</script>