Browse Source

feat: 文件下载名称类型问题

main
betaqi 4 weeks ago
parent
commit
7803e09dce
  1. 5
      src/views/engineering/index.vue

5
src/views/engineering/index.vue

@ -110,7 +110,10 @@ async function handleDownload(item: IEngineeringOV) {
const link = document.createElement('a') const link = document.createElement('a')
link.style.display = 'none' link.style.display = 'none'
link.href = URL.createObjectURL(blob) link.href = URL.createObjectURL(blob)
link.download = item.name const urlFileName = item.downloadPath.substring(
item.downloadPath.lastIndexOf('/') + 1,
)
link.download = urlFileName
document.body.appendChild(link) document.body.appendChild(link)
link.click() link.click()
document.body.removeChild(link) document.body.removeChild(link)

Loading…
Cancel
Save