filePreview(row) {
fetch(row.attachmentContent.url).then(res =>
res.blob().then(blob => {
var a = document.createElement('a');
var url = window.URL.createObjectURL(blob);
var name = row.attachmentContent.name;
a.href = url;
a.download = name; // 下载名称
a.click();
window.URL.revokeObjectURL(url);
})
);
},
根据https链接点击按钮下载文件
最新推荐文章于 2024-07-11 15:29:37 发布