js图片不打开直接下载(文件下载)
fetch(放要下载的url).then(async res => await res.blob()).then((blob) => {
const a = document.createElement('a');
a.style.display = 'none';
a.href = URL.createObjectURL(blob);
a.download = 放要下载的名字;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
})