mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(hooks): 状态管理模块拆分
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user