mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 20:21:20 -08:00
refactor(core): CORE-12 type template resources and verify bundled notices
This commit is contained in:
1 parent
b8039ad1f1
commit
9eb7c945ca
101 files changed
+7363
-664
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { def, getIcon } from '../utils'
|
||||
import defaults from './defaults'
|
||||
|
||||
export default class Icons {
|
||||
readonly [key: string]: HTMLElement
|
||||
|
||||
constructor(art: { option: { icons: Record<string, string | HTMLElement> } }) {
|
||||
const icons: Record<string, string | HTMLElement | undefined> = { ...defaults, ...art.option.icons }
|
||||
for (const key in icons) {
|
||||
def(this, key, {
|
||||
get: (): HTMLElement => getIcon(key, icons[key]),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user