App.vue 877 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <el-config-provider :locale="zh_CN">
  3. <ele-config-provider
  4. :locale="eleZh_CN"
  5. :table="tableConfig"
  6. :map-key="MAP_KEY"
  7. :license="LICENSE_CODE"
  8. >
  9. <ele-app>
  10. <router-view />
  11. </ele-app>
  12. </ele-config-provider>
  13. </el-config-provider>
  14. </template>
  15. <script setup>
  16. import { MAP_KEY, LICENSE_CODE } from '@/config/setting';
  17. import { useGlobalConfig } from '@/config/use-global-config';
  18. import { useThemeStore } from '@/store/modules/theme';
  19. import zh_CN from 'element-plus/es/locale/lang/zh-cn';
  20. import eleZh_CN from 'ele-admin-plus/es/lang/zh_CN';
  21. import dayjs from 'dayjs';
  22. import 'dayjs/locale/zh-cn';
  23. dayjs.locale('zh-cn');
  24. /** 组件全局配置 */
  25. const { tableConfig } = useGlobalConfig();
  26. /** 恢复主题 */
  27. const themeStore = useThemeStore();
  28. themeStore.recoverTheme();
  29. </script>