fix(测试跟踪): 修复firefox下载模版缺陷

This commit is contained in:
fit2-zhao 2020-09-23 11:02:32 +08:00
parent 3dfab4b13f
commit 4b1c6a4a8a
1 changed files with 2 additions and 1 deletions

View File

@ -136,7 +136,8 @@ export default {
.then(response => {
let fileName = window.decodeURI(response.headers['content-disposition'].split('=')[1]);
let link = document.createElement("a");
link.href = window.URL.createObjectURL(new Blob([response.data], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}));
console.log(response.data);
link.href = window.URL.createObjectURL(new Blob([response.data]));
link.download = fileName;
link.click();
});