mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 05:11:20 -08:00
提取共用方法
This commit is contained in:
1 parent
48ade99047
commit
7a84c262da
45 files changed
+242
-257
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { append } from './utils';
|
||||
import { append, addClass, removeClass } from './utils';
|
||||
|
||||
export default class Loading {
|
||||
constructor(art) {
|
||||
@@ -11,11 +11,11 @@ export default class Loading {
|
||||
const { $player } = this.art.template;
|
||||
if (value) {
|
||||
this.state = true;
|
||||
$player.classList.add('artplayer-loading-show');
|
||||
addClass($player, 'artplayer-loading-show');
|
||||
this.art.emit('loading:show');
|
||||
} else {
|
||||
this.state = false;
|
||||
$player.classList.remove('artplayer-loading-show');
|
||||
removeClass($player, 'artplayer-loading-show');
|
||||
this.art.emit('loading:hide');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user