downloadPdf(result) {
let blob = new Blob([result], {type: ‘application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=utf-8’}); //application/vnd.openxmlformats-officedocument.wordprocessingml.document这里表示doc类型
let downloadElement = document.createElement(‘a’);
let href = window.URL.createObjectURL(blob); //创建下载的链接
let filename = href.match(/.+/(.+) / ) [ 1 ] + ′ . p d f ′ ; /
下载文件流文件
最新推荐文章于 2024-03-31 19:10:16 发布