update 上传组件增加下载全部按钮
This commit is contained in:
@@ -165,6 +165,26 @@ export function downloadFile(url, fileName, parameter) {
|
||||
downloadFileByA(data, fileName)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* post请求下载文件zip
|
||||
* @param url 文件路径
|
||||
* @param fileName 文件名
|
||||
* @param parameter
|
||||
* @returns {*}
|
||||
*/
|
||||
export function downloadFileZip(url, fileName, parameter) {
|
||||
return axios({
|
||||
url: url,
|
||||
data: parameter,
|
||||
method: 'post',
|
||||
responseType: 'blob'
|
||||
}).then((data) => {
|
||||
// 调用a标签下载文件的方法
|
||||
downloadFileByA(data, fileName)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* post下载文件
|
||||
* @param url 文件路径
|
||||
|
||||
Reference in New Issue
Block a user