mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
i18n改用json格式
This commit is contained in:
1 parent
ffd7a38b35
commit
0bc9c88af2
18 files changed
+211
-184
No files matched your search
@@ -108,18 +108,6 @@ export function remove(child) {
|
||||
return child.parentNode.removeChild(child);
|
||||
}
|
||||
|
||||
export function insertByIndex(parent, child, index) {
|
||||
const childs = Array.from(parent.children);
|
||||
child.dataset.index = index;
|
||||
const nextChild = childs.find(item => Number(item.dataset.index) >= Number(index));
|
||||
if (nextChild) {
|
||||
nextChild.insertAdjacentElement('beforebegin', child);
|
||||
} else {
|
||||
append(parent, child);
|
||||
}
|
||||
return child;
|
||||
}
|
||||
|
||||
export function setStyle(element, key, value) {
|
||||
element.style[key] = value;
|
||||
return element;
|
||||
@@ -171,7 +159,7 @@ export function vttToBlob(vttText) {
|
||||
);
|
||||
}
|
||||
|
||||
export function downloadImage(url, name) {
|
||||
export function downloadFile(url, name) {
|
||||
const elink = document.createElement('a');
|
||||
setStyle(elink, 'display', 'none');
|
||||
elink.href = url;
|
||||
|
||||
Reference in new issue
Block a user