Commit 5f70d31f by wuqian

下载素材方式改变

parent 806e5ca1
......@@ -4115,7 +4115,14 @@ const downloadMaterial = async () => {
try {
const res = await downloadMaterialApi(selectedIds)
if (res.code !== 200) return
window.open(filePath + res.message)
// window.open(filePath + res.message)
const a = document.createElement('a')
a.href = filePath + res.message
a.download = res.message!
a.target = '_blank'
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
} catch (e) {
// showError(e)
console.error(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