前端下载文件流
var blob = new Blob([res.data], {
type: "application/octet-stream;charset=UTF-8"
});
let elink = document.createElement("a");
elink.download = ' 文件名称';
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(blob);
document.body.removeChild(elink);
我其实也有努力呀