js创建a标签实现文件下载
export function downLoad(url){
let aLink =document.createElement('a')
aLink.href = URL.createObjectURL(url)
aLink.download = 'fileName'
aLink.style.display = 'none'
aLink.target = '_top'
// aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
setTimeout(function () {
URL.revokeObjectURL(aLink.href) // 释放URL对象
document.body.removeChild(aLink)//移除a标签
}, 1500)
}