mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
添加设置样式小工具
This commit is contained in:
1 parent
6e4087a080
commit
96a6e1eb0e
14 files changed
+113
-109
No files matched your search
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user