完成gif插件

This commit is contained in:
Harvey Zack committed 2018-12-06 15:39:47 +08:00
1 parent d535423dd8
commit c9dfc883ab
11 files changed
+352 -54

No files matched your search

+10
View File
@@ -170,3 +170,13 @@ export function vttToBlob(vttText) {
}),
);
}
export function downloadImage(url, name) {
const elink = document.createElement('a');
setStyle(elink, 'display', 'none');
elink.href = url;
elink.download = name;
document.body.appendChild(elink);
elink.click();
document.body.removeChild(elink);
}