add themeMix

This commit is contained in:
zhw2590582 committed 2022-01-07 18:05:28 +08:00
1 parent 59400eb3bf
commit 1438ce5e82
16 files changed
+428 -410

No files matched your search

+18
View File
@@ -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);
},
});
}