mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
23 lines
507 B
JavaScript
23 lines
507 B
JavaScript
import icons from './icons';
|
|
import { append, setStyle } from './utils';
|
|
|
|
export default class Mask {
|
|
constructor(art) {
|
|
this.art = art;
|
|
const { option, refs: { $mask } } = art;
|
|
append($mask, option.play || icons.playBig);
|
|
}
|
|
|
|
show() {
|
|
const { $mask } = this.art.refs;
|
|
setStyle($mask, 'display', 'flex');
|
|
this.art.emit('mask:show', $mask);
|
|
}
|
|
|
|
hide() {
|
|
const { $mask } = this.art.refs;
|
|
setStyle($mask, 'display', 'none');
|
|
this.art.emit('mask:show', $mask);
|
|
}
|
|
}
|