mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 01:26:16 -08:00
fix bug
This commit is contained in:
1 parent
7cdf9f69e6
commit
32e93bb875
9 files changed
+23
-15
No files matched your search
+6
-3
@@ -3,23 +3,26 @@ import Icons from './icons';
|
||||
export default class Loading {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
this.state = false;
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
const { option } = this.art;
|
||||
const { option, refs: { $loading } } = this.art;
|
||||
if (option.loading) {
|
||||
this.art.refs.$loading.insertAdjacentHTML('beforeend', option.loading);
|
||||
$loading.insertAdjacentHTML('beforeend', option.loading);
|
||||
} else {
|
||||
this.art.refs.$loading.appendChild(Icons.loading);
|
||||
$loading.appendChild(Icons.loading);
|
||||
}
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.state = false;
|
||||
this.art.refs.$loading.style.display = 'none';
|
||||
}
|
||||
|
||||
show() {
|
||||
this.state = true;
|
||||
this.art.refs.$loading.style.display = 'block';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user