添加设置样式小工具

This commit is contained in:
Harvey Zack committed 2018-10-30 16:53:13 +08:00
1 parent 6e4087a080
commit 96a6e1eb0e
14 files changed
+113 -109

No files matched your search

+3 -2
View File
@@ -1,3 +1,4 @@
import { setStyle } from '../utils';
import Danmu from './danmu';
import Fullscreen from './fullscreen';
import Pip from './pip';
@@ -138,14 +139,14 @@ export default class Controls {
commonMethod(control) {
Object.defineProperty(control, 'hide', {
value: () => {
control.option.$control.style.display = 'none';
setStyle(control.option.$control, 'display', 'none');
this.art.emit('control:hide', control.option.$control);
}
});
Object.defineProperty(control, 'show', {
value: () => {
control.option.$control.style.display = 'block';
setStyle(control.option.$control, 'display', 'block');
this.art.emit('control:show', control.option.$control);
}
});