mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 17:46:17 -08:00
add loading
This commit is contained in:
1 parent
e319afd422
commit
7cdf9f69e6
14 files changed
+329
-6
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import Icons from './icons';
|
||||
|
||||
export default class Loading {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
const { option } = this.art;
|
||||
if (option.loading) {
|
||||
this.art.refs.$loading.insertAdjacentHTML('beforeend', option.loading);
|
||||
} else {
|
||||
this.art.refs.$loading.appendChild(Icons.loading);
|
||||
}
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.art.refs.$loading.style.display = 'none';
|
||||
}
|
||||
|
||||
show() {
|
||||
this.art.refs.$loading.style.display = 'block';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user