fix download name

This commit is contained in:
Theluyuan 2023-05-05 09:45:18 +08:00
parent b0e80b8a49
commit f2249478ed
4 changed files with 102 additions and 92 deletions

View File

@ -1183,7 +1183,10 @@ const _sfc_main = defineComponent({
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
</body>
</html>`;
window.location.href = uri + base64(exportTemplate);
let a = document.createElement("a");
a.href = uri + base64(exportTemplate);
a.download = "\u4E0B\u8F7D\u6587\u4EF6.xls";
a.click();
return;
};
function base64(s2) {

View File

@ -19607,7 +19607,10 @@ const _sfc_main$D = defineComponent({
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
</body>
</html>`;
window.location.href = uri + base64(exportTemplate);
let a = document.createElement("a");
a.href = uri + base64(exportTemplate);
a.download = "\u4E0B\u8F7D\u6587\u4EF6.xls";
a.click();
return;
};
function base64(s2) {

View File

@ -421,7 +421,11 @@ const exportData = () => {
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
</body>
</html>`;
window.location.href = uri + base64(exportTemplate);
let a = document.createElement("a")
a.href = uri + base64(exportTemplate);
a.download="下载文件.xls";
a.click();
// window.location.href =
return;
};

File diff suppressed because one or more lines are too long