Browse Source

调整pdf样式

徐展城 2 tuần trước cách đây
mục cha
commit
9e7dbe41cd

+ 5 - 0
yudao-ui-admin-vue3/src/views/pressure2/boilerchecker/components/StatusOperationPanel.vue

@@ -2445,6 +2445,11 @@ const initPreview=()=>{
 
   initPreviewTimer.value = setTimeout(()=>{
     initPreviewTimer.value = null
+    // 重新计算 PDF 区域宽度,确保不同屏幕下首次渲染时宽度正确
+    if (pdfPanelRef.value) {
+      const width = pdfPanelRef.value.clientWidth - 20
+      pdfContentWidth.value = props.isFullscreen ? width : (width > 1030 ? 1030 : width)
+    }
     spreadRef.value?.reloadView();
   },50)
 

+ 5 - 0
yudao-ui-admin-vue3/src/views/pressure2/pipechecker/components/StatusOperationPanel.vue

@@ -2335,6 +2335,11 @@ const initPreview=()=>{
 
   initPreviewTimer.value = setTimeout(()=>{
     initPreviewTimer.value = null
+    // 重新计算 PDF 区域宽度,确保不同屏幕下首次渲染时宽度正确
+    if (pdfPanelRef.value) {
+      const width = pdfPanelRef.value.clientWidth - 20
+      pdfContentWidth.value = props.isFullscreen ? width : (width > 1030 ? 1030 : width)
+    }
     spreadRef.value?.reloadView();
   },50)