From 20c69b4be7eadcaf5dcfadde36882abb1d89dc12 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 26 Jul 2022 20:39:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=87=BA=E6=80=A7=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=8A=A5=E5=91=8A=E5=9B=BE=E9=94=99=E4=B9=B1=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1015370 --user=刘瑞斌 【性能测试】导出报告后查看pdf报告,显示内容不对 https://www.tapd.cn/55049933/s/1212803 --- frontend/src/common/js/utils.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/common/js/utils.js b/frontend/src/common/js/utils.js index d2946f13e3..7046940079 100644 --- a/frontend/src/common/js/utils.js +++ b/frontend/src/common/js/utils.js @@ -271,7 +271,7 @@ export function exportPdf(name, canvasList) { let blankHeight = a4Height - currentHeight; if (leftHeight > blankHeight) { - if (blankHeight < 200) { + if (blankHeight < 300) { pdf.addPage(); currentHeight = 0; } @@ -285,10 +285,10 @@ export function exportPdf(name, canvasList) { leftHeight -= occupation; position -= occupation; //避免添加空白页 - // if (leftHeight > 0) { - // pdf.addPage(); - // currentHeight = 0; - // } + if (leftHeight > 0) { + pdf.addPage(); + currentHeight = 0; + } } } else { pdf.addImage(pageData, 'JPEG', 0, currentHeight, imgWidth, imgHeight);