优化全局注入dict_data

This commit is contained in:
XIE7654
2025-07-16 13:56:02 +08:00
parent baa650ea64
commit 3fe272ffca
11 changed files with 219 additions and 24 deletions

View File

@@ -7,12 +7,17 @@ import { preferences, usePreferences } from '@vben/preferences';
import { App, ConfigProvider, theme } from 'ant-design-vue';
import { antdLocale } from '#/locales';
import { useDictStore } from '#/store/dict';
defineOptions({ name: 'App' });
const { isDark } = usePreferences();
const { tokens } = useAntdDesignTokens();
const dictStore = useDictStore();
dictStore.fetchDictData();
const tokenTheme = computed(() => {
const algorithm = isDark.value
? [theme.darkAlgorithm]