Dark mode fix first page loading
This commit is contained in:
@@ -35,6 +35,8 @@ export default {
|
||||
|
||||
const site = computed(() => globalStore.site)
|
||||
|
||||
const darkcookie = ref(false)
|
||||
|
||||
watch(() => finishLoading.value, (newval: boolean, oldval: boolean) => {
|
||||
// console.log('watch finished', newval)
|
||||
if (newval) {
|
||||
@@ -44,6 +46,7 @@ export default {
|
||||
|
||||
})
|
||||
|
||||
|
||||
const listaRoutingNoLogin = ['/vreg?', '/offline']
|
||||
|
||||
function meta() {
|
||||
@@ -75,6 +78,8 @@ export default {
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
darkcookie.value = tools.getCookie('darkmode', false, false, false) === '-1'
|
||||
|
||||
scroll()
|
||||
}
|
||||
|
||||
@@ -130,6 +135,7 @@ export default {
|
||||
|
||||
return {
|
||||
finishLoading,
|
||||
darkcookie,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user