提交 b6bb2a89 编写于 作者: xinxu.wang's avatar xinxu.wang

导出时,无法生成Excel

上级 1e4ec919
......@@ -531,8 +531,11 @@
},
downloadFile(base64, fileName) {
let a = document.createElement('a');
let uploadHref = 'data:application/xls;base64,' + base64;
let uploadHref = 'data:application/xlsx;base64,' + base64;
a.setAttribute('href', uploadHref);
if (fileName == null || fileName == '') {
fileName = '数据.xlsx';
}
let exportFileName = fileName;
a.setAttribute('download', exportFileName);
a.click();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册