mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-12 15:26:16 -08:00
19 lines
404 B
JavaScript
19 lines
404 B
JavaScript
import { def } from '../utils';
|
|
|
|
export default function themeMix(art) {
|
|
const {
|
|
option,
|
|
template: { $player },
|
|
} = art;
|
|
|
|
def(art, 'theme', {
|
|
get() {
|
|
return getComputedStyle($player).getPropertyValue('--theme');
|
|
},
|
|
set(theme) {
|
|
option.theme = theme;
|
|
$player.style.setProperty('--theme', theme);
|
|
},
|
|
});
|
|
}
|