refactor:PDF导出默认适配横向大屏

This commit is contained in:
wangjiahao 2021-09-07 14:14:24 +08:00
parent 2bcb9e8a07
commit 6054b8b566
2 changed files with 4 additions and 3 deletions

View File

@ -85,7 +85,7 @@ export default {
const contentWidth = canvas.width
const contentHeight = canvas.height
const pageData = canvas.toDataURL('image/jpeg', 1.0)
const PDF = new JsPDF('p', 'pt', [contentWidth, contentHeight])
const PDF = new JsPDF('l', 'px', [contentWidth, contentHeight])
PDF.addImage(pageData, 'JPEG', 0, 0, contentWidth, contentHeight)
PDF.save(_this.panelName + '.pdf')
}
@ -103,7 +103,7 @@ export default {
}
.export_body_class{
border: 1px solid #dcdfe6 ;
height: 500px;
height: 65vh;
overflow-y: auto;
}

View File

@ -79,7 +79,8 @@
v-if="pdfExportShow"
:title="'['+panelInfo.name+']'+'PDF导出'"
:visible.sync="pdfExportShow"
width="70%"
width="80%"
:top="'8vh'"
:destroy-on-close="true"
class="dialog-css2"
>