fix download name

This commit is contained in:
2023-05-05 09:54:52 +08:00
parent f2249478ed
commit 27f75e2ced
4 changed files with 11 additions and 7 deletions

View File

@@ -950,7 +950,8 @@ const _sfc_main = defineComponent({
getCheckboxProps: { type: Function, default: () => {
} },
getRadioProps: { type: Function, default: () => {
} }
} },
download: { default: "" }
},
emits: [
"change",
@@ -1185,7 +1186,7 @@ const _sfc_main = defineComponent({
</html>`;
let a = document.createElement("a");
a.href = uri + base64(exportTemplate);
a.download = "\u4E0B\u8F7D\u6587\u4EF6.xls";
a.download = (props.download || "\u4E0B\u8F7D\u6587\u4EF6") + ".xls";
a.click();
return;
};