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

--bug=1015370 --user=刘瑞斌 【性能测试】导出报告后查看pdf报告,显示内容不对 https://www.tapd.cn/55049933/s/1212803
This commit is contained in:
CaptainB 2022-07-26 20:39:22 +08:00 committed by 刘瑞斌
parent 7fa7a76938
commit 20c69b4be7

View File

@ -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);