Vue中使用Blob进行文件下载
一、 常规用法 chrome正常使用,IE11 、Firefox 不兼容
let a = document.createElement('a');
let blob = new Blob([response.data], {type: "application/vnd.ms-excel"});
let objectUrl = URL.createObjectURL(blob);
a.setAttribute("href",objectUrl);
a.setAttri
原创
2020-05-13 11:25:37 ·
1976 阅读 ·
0 评论