mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
add error icon
This commit is contained in:
1 parent
5dbac4897b
commit
2f9e0d49ee
51 files changed
+182
-146
No files matched your search
@@ -1,12 +1,23 @@
|
||||
import { append } from './utils';
|
||||
import { append, setStyle } from './utils';
|
||||
import Component from './utils/component';
|
||||
|
||||
export default class Mask extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
|
||||
this.name = 'mask';
|
||||
const { template, icons, events } = art;
|
||||
append(template.$state, icons.state);
|
||||
|
||||
const $state = append(template.$state, icons.state);
|
||||
const $error = append(template.$state, icons.error);
|
||||
|
||||
setStyle($error, 'display', 'none');
|
||||
|
||||
art.on('destroy', () => {
|
||||
setStyle($state, 'display', 'none');
|
||||
setStyle($error, 'display', null);
|
||||
});
|
||||
|
||||
events.proxy(template.$state, 'click', () => art.play());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user