let x = new XMLHttpRequest();
x.open("GET", val.filePath, true);
x.responseType = "blob";
x.onload = () => {
//self.exportLoading = false;
let url = window.URL.createObjectURL(x.response);
let a = document.createElement("a");
a.href = url;
a.download = val.filePath;
a.click();
};
x.send();
其中val.filePath是自己的文件路径