简化事件

This commit is contained in:
Harvey committed 2020-05-22 13:23:28 +08:00
1 parent 938b90f3a7
commit 4718cd186b
36 files changed
+223 -250

No files matched your search

+2 -6
View File
@@ -7,14 +7,10 @@ export function getExt(url) {
return getExt(url.split('#')[0]);
}
return url
.trim()
.toLowerCase()
.split('.')
.pop();
return url.trim().toLowerCase().split('.').pop();
}
export function downloadFile(url, name) {
export function download(url, name) {
const elink = document.createElement('a');
elink.style.display = 'none';
elink.href = url;