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)
前端接收文件流下载到本地
最新推荐文章于 2025-05-26 10:51:34 发布