提交 66210c48 authored 作者: CRS's avatar CRS

new

上级 3a8c54de
......@@ -888,7 +888,8 @@ export default {
query: {
username: this.$route.query.username,
id: this.$route.query.id,
popp: this.popp.basic
popp: this.popp.basic,
agree: this.isAgree
}
});
window.open(href, '_blank');
......
// 导出页面为PDF格式
import Vue from 'vue'
let v = new Vue();
import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
export default {
import {
Loading
} from 'element-ui'
let loading;
export default{
install (Vue, options) {
Vue.prototype.getPdf = function () {
loading = Loading.service({
lock: true,
text: '正在下载pdf...',
background: 'rgba(0,0,0,.5)'
});
let title = this.htmlTitle
v.$message.info('正在生成pdf文件!请稍等')
html2Canvas(document.querySelector('#pdfDom'), {
allowTaint: true
}).then(function (canvas) {
......@@ -32,6 +38,7 @@ export default {
}
}
}
loading.close();
PDF.save(title + '.pdf')
})
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论