Skip to content
Snippets Groups Projects
Commit cb5c0ac2 authored by syuilo's avatar syuilo
Browse files

Fix bug

parent 4798657b
No related branches found
Tags 13.10.3
No related merge requests found
......@@ -21,10 +21,20 @@ export default Vue.extend({
$route: 'fetch'
},
created() {
const applyBg = v =>
document.documentElement.style.setProperty('background', v ? '#191b22' : '#fff', 'important');
applyBg(this.$store.state.device.darkmode);
this.unwatchDarkmode = this.$store.watch(s => {
return s.device.darkmode;
}, applyBg);
this.fetch();
},
mounted() {
document.documentElement.style.background = '#fff';
beforeDestroy() {
document.documentElement.style.removeProperty('background');
this.unwatchDarkmode();
},
methods: {
fetch() {
......@@ -50,6 +60,5 @@ export default Vue.extend({
flex 1
flex-direction column
min-height 100%
background #fff
</style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment