From de8dbab2dae4853f781ae91e6ca864fdf9b361e7 Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期二, 28 五月 2024 17:48:21 +0800
Subject: [PATCH] 修复放大缩小

---
 src/books/childHealth/view/index.vue         |   13 +------------
 src/App.vue                                  |    4 ++--
 src/books/childHealth/view/content/index.vue |   19 +++++++++++++++++--
 3 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index f4df404..8abd459 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -58,10 +58,10 @@
     } else {
       this.activeBook = await this.config.getBookConfig(
         // childHealth
-        this.config.resourceCtx + "lifeCare"
+        this.config.resourceCtx + "childHealth"
       );
       // 娴嬭瘯璇曡30椤�
-      // this.activeBook.tryPageCount = 30;
+      // this.activeBook.tryPageCount = 10;
 
       this.config.activeBook = this.activeBook;
       this.config.goodsStore = this.activeBook.storeRefcode;
diff --git a/src/books/childHealth/view/content/index.vue b/src/books/childHealth/view/content/index.vue
index 63b78b9..6a116dd 100644
--- a/src/books/childHealth/view/content/index.vue
+++ b/src/books/childHealth/view/content/index.vue
@@ -1,6 +1,13 @@
 <template>
   <div class="page-main" @scroll="throttledScrollHandler">
-    <div class="page-content">
+    <div
+      class="page-content"
+      :style="{
+        fontSize: fontSize ? fontSize + 'px' : '16px',
+        transform: `scale(${pageZoom ? pageZoom : 1})`,
+        transformOrigin: 'center top'
+      }"
+    >
       <pageHeader
         v-if="showCatalogList.indexOf(0) > -1"
         :showPageList="loadPageList"
@@ -104,6 +111,14 @@
       loadPageList: [],
       questionData: {}
     };
+  },
+  computed: {
+    fontSize() {
+      return this.$store.state.qiankun.fontSize;
+    },
+    pageZoom() {
+      return this.$store.state.qiankun.scale / 100;
+    }
   },
   provide() {
     return {
@@ -464,7 +479,7 @@
             "chapter"
           );
           const catalog = catalogDom.getAttribute("num");
-          console.log(page,"page",catalog,"catalog");
+          console.log(page, "page", catalog, "catalog");
           // 杩斿洖椤电爜鍜岀珷鑺備俊鎭�
           if (this.$store.state.qiankun && this.$store.state.qiankun.pageChange)
             this.$store.state.qiankun.pageChange({
diff --git a/src/books/childHealth/view/index.vue b/src/books/childHealth/view/index.vue
index 3c0e84d..ccc836f 100644
--- a/src/books/childHealth/view/index.vue
+++ b/src/books/childHealth/view/index.vue
@@ -2,10 +2,6 @@
   <div
     class="temp-book"
     @mouseup="handleMouseUp"
-    :style="{
-      fontSize: fontSize ? fontSize + 'px' : '16px',
-      transform: `scale(${pageZoom ? pageZoom : 1})`
-    }"
   >
     <pageContent></pageContent>
   </div>
@@ -20,14 +16,7 @@
   data() {
     return {};
   },
-  computed: {
-    fontSize() {
-      return this.$store.state.qiankun.fontSize;
-    },
-    pageZoom() {
-      return this.$store.state.qiankun.scale / 100;
-    }
-  },
+  
   mounted() {},
   methods: {
     getParentWithClass(element, className) {

--
Gitblit v1.9.1