fetch(res.data)
.then(response => response.blob())
.then(blob => {
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.setAttribute('download', item.aiName) // 设置新的文件名
link.click()
window.URL.revokeObjectURL(url) // 释放URL对象
})
下载pdf,zip等自定义名字
最新推荐文章于 2024-07-17 14:37:08 发布