From ffb938e7a65c0dab30dd8ed00a13c68dcf7bd77c Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期五, 25 十月 2024 16:48:36 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout

---
 src/books/civilAviation/view/components/index.vue |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/books/civilAviation/view/components/index.vue b/src/books/civilAviation/view/components/index.vue
index 294406d..2cee5ad 100644
--- a/src/books/civilAviation/view/components/index.vue
+++ b/src/books/civilAviation/view/components/index.vue
@@ -1,11 +1,11 @@
 <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',
-      transform: `scale(${pageZoom ? pageZoom : 1})`,
+      fontSize: fontSize + 'px',
+      transform: `scale(${pageZoom})`,
       transformOrigin: 'center top',
     }">
       <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader>
@@ -46,10 +46,11 @@
   },
   computed: {
     fontSize() {
-      return this.$store.state.qiankun.fontSize;
+      this.transformDom(this.$store.state.qiankun.fontSize)
+      return this.$store.state.qiankun.fontSize ? this.$store.state.qiankun.fontSize : 18;
     },
     pageZoom() {
-      return this.$store.state.qiankun.scale / 100;
+      return this.$store.state.qiankun.scale ? this.$store.state.qiankun.scale / 100 : 1;
     },
   },
   watch: {
@@ -74,6 +75,7 @@
     loadPageList: {
       handler(newVal, oldVal) {
         setTimeout(() => {
+          this.transformDom(this.$store.state.qiankun.fontSize)
           this.initSwiper();
           this.initViewer();
           this.closeAudio();
@@ -209,7 +211,7 @@
           event.target.scrollHeight - this.loadThreshold
         ) {
           console.log(1);
-          
+
           debugger
           // 鍒拌揪闃堝��
           if (
@@ -909,6 +911,18 @@
           playVudio.requestPictureInPicture();
         }
       }
+    },
+    //鍏朵粬绫诲悕涓嬪瓧浣撳ぇ灏忓彉鍖�
+    transformDom(fs) {
+      if(!fs) return
+      let doms = (
+        this.container ? this.container : document
+      ).querySelectorAll('.block')
+      if(!doms.length) return 
+      for (let index = 0; index < doms.length; index++) {
+        const dom = doms[index];
+        dom.style.fontSize = fs + 'px'
+      }
     }
   },
   components: {

--
Gitblit v1.9.1