1,blob
const blob = new Blob([res.data]);//处理文档流
const fileName = 'report.xlsx';
const link = document.createElement('a');
link.download = fileName;
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href); // 释放URL 对象
document.body.removeChild(link);
2,url
const link = document.createElement('a');
link.style.display = 'none';
link.href = filepath;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);