fix(性能测试): 修复导出性能测试报告图错乱的问题
--bug=1015370 --user=刘瑞斌 【性能测试】导出报告后查看pdf报告,显示内容不对 https://www.tapd.cn/55049933/s/1212803
This commit is contained in:
parent
dc66555da5
commit
c7af2c10d0
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue