mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 09:41:20 -08:00
add createElement
This commit is contained in:
1 parent
326a292e27
commit
8c9db3f302
10 files changed
+50
-42
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { append, def, addClass } from '../utils';
|
||||
import { append, def, addClass, createElement } from '../utils';
|
||||
import loading from 'bundle-text:./loading.svg';
|
||||
import state from 'bundle-text:./state.svg';
|
||||
import check from 'bundle-text:./check.svg';
|
||||
@@ -63,7 +63,7 @@ export default class Icons {
|
||||
Object.keys(icons).forEach((key) => {
|
||||
def(this, key, {
|
||||
get: () => {
|
||||
const icon = document.createElement('i');
|
||||
const icon = createElement('i');
|
||||
addClass(icon, 'art-icon');
|
||||
addClass(icon, `art-icon-${key}`);
|
||||
append(icon, icons[key]);
|
||||
|
||||
Reference in new issue
Block a user