diff --git a/src/App.vue b/src/App.vue index abbb3621..14139b3e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,16 +5,21 @@ import { computed } from 'vue'; import { useRoute } from 'vue-router' import { + darkTheme, NConfigProvider, NGlobalStyle, } from 'naive-ui' +import { useStyleStore } from './stores/style.store'; const route = useRoute(); const layout = computed(() => route?.meta?.layout ?? layouts.base) +const styleStore = useStyleStore() + +const theme = computed(() => styleStore.isDarkTheme ? darkTheme : null)