mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
添加灯光模式
This commit is contained in:
1 parent
4867d8e25a
commit
3379e6091c
18 files changed
+170
-54
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { def, getStyle, setStyle } from '../utils';
|
||||
|
||||
export default function lightMix(art, player) {
|
||||
const { $undercover } = art.template;
|
||||
|
||||
def(player, 'light', {
|
||||
get() {
|
||||
return getStyle($undercover, 'display', false) !== 'none';
|
||||
},
|
||||
set(value) {
|
||||
setStyle($undercover, 'display', value ? 'block' : 'none');
|
||||
art.emit('light', value);
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user