fix(性能测试): 修复导出报告图表错乱的问题

This commit is contained in:
CaptainB 2022-11-18 16:30:44 +08:00 committed by 刘瑞斌
parent 13c5754098
commit 87e00fb3d5
1 changed files with 5 additions and 5 deletions

View File

@ -168,7 +168,7 @@ export function exportPdf(name, canvasList) {
let blankHeight = a4Height - currentHeight; let blankHeight = a4Height - currentHeight;
if (leftHeight > blankHeight) { if (leftHeight > blankHeight) {
if (blankHeight < 200) { if (blankHeight < 300) {
pdf.addPage(); pdf.addPage();
currentHeight = 0; currentHeight = 0;
} }
@ -182,10 +182,10 @@ export function exportPdf(name, canvasList) {
leftHeight -= occupation; leftHeight -= occupation;
position -= occupation; position -= occupation;
//避免添加空白页 //避免添加空白页
// if (leftHeight > 0) { if (leftHeight > 0) {
// pdf.addPage(); pdf.addPage();
// currentHeight = 0; currentHeight = 0;
// } }
} }
} else { } else {
pdf.addImage(pageData, 'JPEG', 0, currentHeight, imgWidth, imgHeight); pdf.addImage(pageData, 'JPEG', 0, currentHeight, imgWidth, imgHeight);