const aLink = document.createElement('a')
aLink.setAttribute('href', res?.data)
aLink.setAttribute('download', `名字.xlsx`)
aLink.click()
aLink.remove()
html的页面通过a链接下载文件
最新推荐文章于 2024-05-07 11:56:11 发布
const aLink = document.createElement('a')
aLink.setAttribute('href', res?.data)
aLink.setAttribute('download', `名字.xlsx`)
aLink.click()
aLink.remove()