|
|
|
|
@ -143,6 +143,16 @@ export default {
|
|
|
|
|
document.body.removeChild(elink)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
downloadFileUrl(fileName, fileUrl) {
|
|
|
|
|
const elink = document.createElement('a')
|
|
|
|
|
elink.download = fileName
|
|
|
|
|
elink.style.display = 'none'
|
|
|
|
|
elink.href = fileUrl
|
|
|
|
|
document.body.appendChild(elink)
|
|
|
|
|
elink.click()
|
|
|
|
|
URL.revokeObjectURL(elink.href) // 释放URL 对象
|
|
|
|
|
document.body.removeChild(elink)
|
|
|
|
|
},
|
|
|
|
|
/*
|
|
|
|
|
* 根据文件名的尾缀 返回文件类型
|
|
|
|
|
* @param {any} fileName 文件名
|
|
|
|
|
|