Commit 640e6d02 by qinjianhui

fix: 多个文件循环下载问题修改

parent 9b2ae5c2
......@@ -1441,7 +1441,13 @@ const downloadMaterial = async () => {
const res = await downloadMaterialApi(ids)
const { data } = res
data.forEach((item: string) => {
window.open(filePath + item)
const a = document.createElement('a')
a.href = filePath + item
a.download = item
a.target = '_blank'
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
})
} catch (e) {
// showError(e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment