YM
2024-05-31 8ed02cf40e1373bf02e0b193f27d3437e90bcdef
src/books/artAndDance/view/components/index.vue
@@ -17,6 +17,11 @@
        v-if="showCatalogList.indexOf(2) > -1"
        :showPageList="loadPageList"
      ></chapterOne>
      <chapterTwo
        v-if="showCatalogList.indexOf(3) > -1"
        :showPageList="loadPageList"
      >
      </chapterTwo>
    </div>
  </div>
</template>
@@ -24,6 +29,7 @@
<script>
import pageHeader from "./header.vue";
import chapterOne from "./chapter001.vue";
import chapterTwo from "./chapter002.vue";
import NoteIcon from "@/assets/images/biji.png";
import _ from "lodash";
import Swiper from "swiper/bundle";
@@ -33,7 +39,7 @@
export default {
  data() {
    return {
      catalogLength: 2, // 总章节数
      catalogLength: 3, // 总章节数
      showCatalogList: [], // 显示的章节
      loadThreshold: 300, // 触发加载阈值
      throttleThreshold: 100, // 节流阈值
@@ -586,16 +592,16 @@
          init:(value) => {
            let currentPage = value.activeIndex + 1; // 获取当前页(从1开始计数)
            let totalPages = value.slides.length; // 获取总页数
            var paginationInfoEl = dom.querySelector('.pageBox');
              var paginationInfoEl = dom.querySelector(".pageBox");
            if(paginationInfoEl)
              paginationInfoEl.textContent = currentPage + '/' + totalPages;
                paginationInfoEl.textContent = currentPage + "/" + totalPages;
          },
          slideChange:(value) => {
            let currentPage = value.activeIndex + 1; // 获取当前页(从1开始计数)
            let totalPages = value.slides.length; // 获取总页数
            var paginationInfoEl = dom.querySelector('.pageBox');
              var paginationInfoEl = dom.querySelector(".pageBox");
            if(paginationInfoEl)
              paginationInfoEl.textContent = currentPage + '/' + totalPages;
                paginationInfoEl.textContent = currentPage + "/" + totalPages;
          },
        },
      });
@@ -634,6 +640,7 @@
  components: {
    pageHeader,
    chapterOne,
    chapterTwo,
  },
};
</script>