mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 21:31:20 -08:00
调整整体样式
This commit is contained in:
1 parent
487e865017
commit
fa585e536a
49 files changed
+984
-322
No files matched your search
@@ -1,22 +1,24 @@
|
||||
import { append, setStyle } from './utils';
|
||||
import { append } from './utils';
|
||||
|
||||
export default class Mask {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
const { $mask } = art.template;
|
||||
const $playBig = append($mask, '<div class="art-playBig"></div>');
|
||||
append($playBig, art.icons.playBig);
|
||||
const $playBig = append($mask, '<div class="art-state"></div>');
|
||||
append($playBig, art.icons.state);
|
||||
}
|
||||
|
||||
show() {
|
||||
const { $mask } = this.art.template;
|
||||
setStyle($mask, 'display', 'flex');
|
||||
this.art.emit('mask:show', $mask);
|
||||
const { $player } = this.art.template;
|
||||
this.state = true;
|
||||
$player.classList.add('artplayer-mask-show');
|
||||
this.art.emit('mask:show');
|
||||
}
|
||||
|
||||
hide() {
|
||||
const { $mask } = this.art.template;
|
||||
setStyle($mask, 'display', 'none');
|
||||
this.art.emit('mask:show', $mask);
|
||||
const { $player } = this.art.template;
|
||||
this.state = false;
|
||||
$player.classList.remove('artplayer-mask-show');
|
||||
this.art.emit('mask:show');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user