ソースを参照

feat:pdf文档变形问题处理

zhangsiya 10 ヶ月 前
コミット
13e070f87e
1 ファイル変更8 行追加23 行削除
  1. 8 23
      jydocs-pc/src/views/Content.vue

+ 8 - 23
jydocs-pc/src/views/Content.vue

@@ -390,28 +390,13 @@ export default {
     }
   },
   methods: {
-    // 设置操作按钮bottom距离
-    setFixedBottom () {
-      const bottomFooter = document.querySelector('.j-bottom')
-      let ob = { top: 0 }
-      if (bottomFooter) {
-        ob = bottomFooter.getBoundingClientRect()
-      }
-      // bottom出现在视口
-      const bottom = window.innerHeight - ob.top
-      if (bottom > 0 && ob.top !== 0) {
-        $(this.$el).css({ bottom: parseInt(bottom) })
-      } else {
-        $(this.$el).css({ bottom: 0 })
-      }
+    rendered () {
+      console.log('渲染完成')
+    },
+    errorHandler () {
+      this.ddNotPdfPreview()
+      console.log('渲染失败')
     },
-    // rendered () {
-    //   console.log('渲染完成')
-    // },
-    // errorHandler () {
-    //   this.ddNotPdfPreview()
-    //   console.log('渲染失败')
-    // },
     // 使用免费下载特权
     downLoadFreeEvent () {
       if (this.docsInfo?.freeDownload === 0) {
@@ -515,7 +500,7 @@ export default {
       const targetElement = this.$refs.transitionDom
       const rect = targetElement.getBoundingClientRect()
       const innerHeight = window.innerHeight
-      const b = t.getBoundingClientRect().bottom
+      const b = t?.getBoundingClientRect().bottom || 0
       const dom = document.getElementById('footp')
       if (b < 500 || rect.top < innerHeight) {
         dom.style.position = 'unset'
@@ -948,7 +933,7 @@ export default {
 }
 .cont-p {
   .page, .canvasWrapper, canvas {
-    //width: 100%!important;
+    max-width: 100% !important;
     height: auto;
   }
 }