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,8 +1,8 @@
import { watch } from 'vue';
import { useAppStore } from '@/store';
import { useThemeStore } from '@/store';
export default function setupWindicssDarkMode() {
const app = useAppStore();
const theme = useThemeStore();
const DARK_CLASS = 'dark';
@ -19,7 +19,7 @@ export default function setupWindicssDarkMode() {
}
watch(
() => app.themeSettings.darkMode,
() => theme.darkMode,
newValue => {
if (newValue) {
addDarkClass();