【更新】代码生成下载压缩包名字乱码问题修复

pull/56/head
小诺 2 years ago committed by 俞宝山
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…
Cancel
Save