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;
if (leftHeight > blankHeight) {
if (blankHeight < 200) {
if (blankHeight < 300) {
pdf.addPage();
currentHeight = 0;
}
@ -182,10 +182,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);