mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
完成gif插件
This commit is contained in:
1 parent
d535423dd8
commit
c9dfc883ab
11 files changed
+352
-54
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user