1.0.3 • Published 3 years ago

luo-post-down-file v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

luo-post-down-file

Download files by post mode

Install

npm install luo-post-down-file -S

Usage

import luoPostDownFile from 'luo-post-down-file';
import $ from 'jquery';
$.post("/xxx/xxx/xxx", {}, function (data) {
    if (data.status === 'SUCCESS') {
      luoPostDownFile(type, data, '测试.xlsx');
    }
});

Props

参数类型说明
type类型'link'为url链接模式,'blob'为二进制数据模式
data请求返回的文件数据
name文件名称

License

This content is released under the MIT License.

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

5 years ago

1.0.0

5 years ago