直接下载excel
const filename = res.headers["content-disposition"];
const blob = new Blob([res.data]);
var downloadElement = document.createElement("a");
var href = window.URL.createObjectURL(blob);
downloadElement.href = href;
downloadElement.download = decodeURIComponent(filename.split("filename=")[1]);
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement);
window.URL.revokeObjectURL(href);
下载表格中的某条
const url = window.URL.createObjectURL(new Blob([res.data]))
console.log(url)
const link = document.createElement('a')
link.href = url
link.setAttribute('download', row.name)
document.body.appendChild(link)
link.click()