axios.post(url, params, {
method: 'post',
responseType: 'blob'
}).then(res => {
let url = window.URL.createObjectURL(new Blob([res.data]));
let link= document.createElement('a');
link.style.display='none';
link.href=url;
link.setAttribute('download', this.exportFilename);
document.body.appendChild(link);
link.click();
});
网友评论