文件下载
npm i in-exportfile
const exportFile = require('in-exportfile');
import Axios from axios;
function download(url: string, filename: string) {
Axios.get(url, {
responseType: 'blob',
}).then(res => {
exportFile.saveExcel(res.data, fileName);
exportFile.saveCsv(res.data, fileName);
exportFile.downLoadImg(res.data, fileName);
});
}
exportFile.getImgURLs(url, fileName);