fix download name
This commit is contained in:
@@ -52,6 +52,7 @@ export interface TableProps {
|
||||
loading?: boolean;
|
||||
getCheckboxProps?: Function;
|
||||
getRadioProps?: Function;
|
||||
download?:string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<TableProps>(), {
|
||||
@@ -76,6 +77,7 @@ const props = withDefaults(defineProps<TableProps>(), {
|
||||
loading: false,
|
||||
getCheckboxProps: () => {},
|
||||
getRadioProps: () => {},
|
||||
download:""
|
||||
});
|
||||
|
||||
const emit = defineEmits([
|
||||
@@ -423,7 +425,7 @@ const exportData = () => {
|
||||
</html>`;
|
||||
let a = document.createElement("a")
|
||||
a.href = uri + base64(exportTemplate);
|
||||
a.download="下载文件.xls";
|
||||
a.download= (props.download || "下载文件") + ".xls";
|
||||
a.click();
|
||||
// window.location.href =
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user