fix(projects): 完善侧边菜单展开逻辑

This commit is contained in:
Soybean
2021-10-12 16:22:07 +08:00
parent 73505d914f
commit b5f05128ab
10 changed files with 219 additions and 13 deletions

View File

@ -1,6 +1,6 @@
import { defineStore } from 'pinia';
import type { GlobalThemeOverrides } from 'naive-ui';
import { themeSettings } from '@/settings';
import { themeSettings, defaultThemeSettings } from '@/settings';
import { store } from '@/store';
import type { ThemeSettings, NavMode, MultiTabMode, AnimateType, HorizontalMenuPosition } from '@/interface';
import { getHoverAndPressedColor } from './helpers';
@ -57,6 +57,10 @@ const themeStore = defineStore({
}
},
actions: {
/** 设置默认配置 */
setDefaultThemeStore() {
Object.assign(this, defaultThemeSettings);
},
/** 设置暗黑模式 */
handleDarkMode(isDark: boolean) {
this.darkMode = isDark;