const downloadFile = async (item: any) => {
const imageSrc = item.url // 替换成你的图片URL
const response = await fetch(imageSrc)
const blob = await response.blob()
const url = window.URL.createObjectURL(blob)
const link = document.createElement("a")
link.href = url
link.download = item.name // 替换成你想要的图片名称
link.style.display = "none"
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
window.URL.revokeObjectURL(url)
}