mirror of https://gitee.com/xiaonuobase/snowy
【更新】代码生成下载压缩包名字乱码问题修复
parent
e1780efdfd
commit
84888ca6da
|
@ -165,7 +165,7 @@
|
|||
const patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
|
||||
const $link = document.createElement("a");
|
||||
$link.href = URL.createObjectURL(blob);
|
||||
$link.download = patt.exec(contentDisposition)[1]
|
||||
$link.download = decodeURIComponent(patt.exec(contentDisposition)[1])
|
||||
$link.click();
|
||||
document.body.appendChild($link);
|
||||
document.body.removeChild($link); // 下载完成移除元素
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
const patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
|
||||
const $link = document.createElement("a");
|
||||
$link.href = URL.createObjectURL(blob);
|
||||
$link.download = patt.exec(contentDisposition)[1]
|
||||
$link.download = decodeURIComponent(patt.exec(contentDisposition)[1])
|
||||
$link.click();
|
||||
document.body.appendChild($link);
|
||||
document.body.removeChild($link); // 下载完成移除元素
|
||||
|
|
Loading…
Reference in New Issue