mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 09:41:20 -08:00
add themeMix
This commit is contained in:
1 parent
59400eb3bf
commit
1438ce5e82
16 files changed
+428
-410
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { def } from '../utils';
|
||||
|
||||
export default function themeMix(art) {
|
||||
const {
|
||||
option,
|
||||
template: { $player },
|
||||
} = art;
|
||||
|
||||
def(art, 'theme', {
|
||||
get() {
|
||||
return $player.style.getProperty('--theme');
|
||||
},
|
||||
set(theme) {
|
||||
option.theme = theme;
|
||||
$player.style.setProperty('--theme', theme);
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user