mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 13:51:20 -08:00
update
This commit is contained in:
1 parent
5f6febce42
commit
b2159e7d4d
9 files changed
+64
-61
No files matched your search
@@ -29,3 +29,20 @@ export function getExt(url) {
|
||||
.split('.')
|
||||
.pop();
|
||||
}
|
||||
|
||||
|
||||
export function append(parent, child) {
|
||||
if (child instanceof Element) {
|
||||
parent.appendChild(child);
|
||||
} else {
|
||||
parent.innerHTML = child;
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
|
||||
export function setStyle(element, styles) {
|
||||
Object.keys(styles).forEach(key => {
|
||||
element.style[key] = styles[key];
|
||||
});
|
||||
return element;
|
||||
}
|
||||
Reference in new issue
Block a user