in-exportfile
v1.0.0
Published
前端下载文件
Downloads
9
Readme
Javascript File Download
文件下载
Installation
npm i in-exportfile
Usage
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);