mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-13 07:46:17 -08:00
16 lines
381 B
JavaScript
16 lines
381 B
JavaScript
import { def } from '../utils';
|
|
|
|
export default function cssVarMix(art) {
|
|
const { $player } = art.template;
|
|
|
|
def(art, 'cssVar', {
|
|
value(key, value) {
|
|
if (value) {
|
|
return $player.style.setProperty(key, value);
|
|
} else {
|
|
return getComputedStyle($player).getPropertyValue(key);
|
|
}
|
|
},
|
|
});
|
|
}
|