mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
add cssPropertyMix
This commit is contained in:
1 parent
f013f8604e
commit
49e1ed15b8
12 files changed
+72
-49
No files matched your search
@@ -1,18 +1,15 @@
|
||||
import { def } from '../utils';
|
||||
|
||||
export default function themeMix(art) {
|
||||
const {
|
||||
option,
|
||||
template: { $player },
|
||||
} = art;
|
||||
const { option } = art;
|
||||
|
||||
def(art, 'theme', {
|
||||
get() {
|
||||
return getComputedStyle($player).getPropertyValue('--art-theme');
|
||||
return art.cssProperty('--art-theme');
|
||||
},
|
||||
set(theme) {
|
||||
option.theme = theme;
|
||||
$player.style.setProperty('--art-theme', theme);
|
||||
art.cssProperty('--art-theme', theme);
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user