htc 1 semana atrás
pai
commit
cf88d5e773
1 arquivos alterados com 2 adições e 7 exclusões
  1. 2 7
      pages/pdf.vue

+ 2 - 7
pages/pdf.vue

@@ -214,15 +214,10 @@
             ]
         };
 		
-		this.$nextTick(() => {
-			this.calculateScaleAndPosition();
-			this.calculatePdfContainerHeight();
-		});
+		
+		this.calculateScaleAndPosition();
 		uni.onWindowResize(() => {
 			this.calculateScaleAndPosition();
-			this.$nextTick(() => { // 确保 DOM 更新后再计算高度
-				this.calculatePdfContainerHeight();
-			});
 		});
     },
     methods: {