refactor(hooks): 状态管理模块拆分

This commit is contained in:
Soybean
2021-09-07 17:03:59 +08:00
parent 8601ce2ea1
commit 1128ae1870
23 changed files with 346 additions and 361 deletions

View File

@ -1,5 +1,5 @@
<template>
<n-config-provider :locale="zhCN" :date-locale="dateZhCN" :theme="theme" :theme-overrides="app.themeOverrids">
<n-config-provider :locale="zhCN" :date-locale="dateZhCN" :theme="dark" :theme-overrides="theme.themeOverrids">
<n-loading-bar-provider>
<n-dialog-provider>
<n-notification-provider>
@ -26,9 +26,9 @@ import {
NMessageProvider
} from 'naive-ui';
import { AppProviderContent } from '@/components';
import { useAppStore } from '@/store';
import { useThemeStore } from '@/store';
const app = useAppStore();
const theme = computed(() => (app.themeSettings.darkMode ? darkTheme : undefined));
const theme = useThemeStore();
const dark = computed(() => (theme.darkMode ? darkTheme : undefined));
</script>
<style scoped></style>