const domA = document.createElement('a')
domA.download = filename+'.doc'
domA.style.display = 'none'
domA.target = '_blank'
const blob = new Blob([res])
domA.href = URL.createObjectURL(blob)
document.body.appendChild(domA)
domA.click()
URL.revokeObjectURL(domA.href)
document.body.removeChild(domA)
前端接收文件流下载到本地
最新推荐文章于 2024-07-24 23:00:08 发布