Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

in-exportfile

yeliming10ISC1.0.0

前端下载文件

文件下载

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);