提交 9c4f2908 authored 作者: CRS's avatar CRS

nwe

上级 112d4c3d
......@@ -2,7 +2,7 @@
import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
import {
Loading
Message, Loading
} from 'element-ui'
let loading;
export default{
......@@ -17,8 +17,13 @@ export default{
html2Canvas(document.querySelector('#pdfDom'), {
allowTaint: true
}).then(function (canvas) {
let contentWidth = canvas.width
let contentHeight = canvas.height
console.log(canvas)
let contentWidth = canvas.width;
let contentHeight = canvas.height;
if (contentWidth === '' || contentWidth === undefined || contentHeight === '' || contentHeight === undefined) {
loading.close();
Message.error('转换pdf失败,请稍后再试!')
}
let pageHeight = contentWidth / 595 * 842
let leftHeight = contentHeight
let position = 0
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论