[update]-1、增加文件正在下载中的提示语

This commit is contained in:
fengchenchen
2022-11-10 11:20:05 +08:00
parent b37273cf53
commit f8b3e83225
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -161,9 +161,13 @@ export function downloadFileByA(data, fileName) {
* @returns {*}
*/
export function downloadFile(url, fileName, parameter) {
Vue.prototype['$message'].warning('文件正在下载中......', 0)
return downFile(url, parameter).then((data) => {
Vue.prototype['$message'].destroy()
// 调用a标签下载文件的方法
downloadFileByA(data, fileName)
}).catch(() => {
Vue.prototype['$message'].destroy()
})
}
+4
View File
@@ -114,9 +114,13 @@ export function downloadFileByA(data, fileName) {
* @returns {*}
*/
export function downloadFile(url, fileName, parameter) {
Vue.prototype['$message'].warning('文件正在下载中......', 0)
return downFile(url, parameter).then((data) => {
Vue.prototype['$message'].destroy()
// 调用a标签下载文件的方法
downloadFileByA(data, fileName)
}).catch(() => {
Vue.prototype['$message'].destroy()
})
}