// Excel文件导出
export function downloadFile(data, name, endName = ".xls") {
const url = window.URL.createObjectURL(new Blob([data]));
const link = document.createElement("a");
link.style.display = "none";
link.href = url;
const time = dateTimeFormatter(new Date(), "yyyy-MM-dd");
link.setAttribute("download", name + endName);
document.body.appendChild(link);
link.click();
}
前端那些事20240130-前端那些事-vue2中excel导出方法
最新推荐文章于 2024-04-29 13:19:48 发布