mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
refactor(core): CORE-18 type builtins and own prompt lifetimes
This commit is contained in:
1 parent
a842058136
commit
98a1800032
55 files changed
+26511
-650
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import type { ComponentHost } from './component/types'
|
||||
import { appendElement } from './component/dom'
|
||||
import { isClosing } from './lifecycle/instance'
|
||||
import Component from './utils/component'
|
||||
|
||||
export interface LoadingHost extends ComponentHost {
|
||||
template: { $player: HTMLElement, $loading: HTMLElement }
|
||||
icons: { loading: string | Element }
|
||||
}
|
||||
|
||||
export default class Loading extends Component<LoadingHost> {
|
||||
constructor(art: LoadingHost) {
|
||||
super(art)
|
||||
this.name = 'loading'
|
||||
const icon = art.icons.loading
|
||||
if (!isClosing(art))
|
||||
appendElement(art.template.$loading, icon)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user