refactor(frontend): 统一 Element 语言注入并抽出全站皮肤
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
a10ecc8073
commit
81d82a88d5
28 files changed
+144
-240
No files matched your search
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/dashboard/DashboardPage.vue
|
||||
* 用途:管理后台仪表盘,四张可点击的统计卡。
|
||||
* 依赖:useDashboardAdmin、useElementProvider、element-plus。
|
||||
* 依赖:useDashboardAdmin、element-plus。
|
||||
* 逻辑:路由 /admin/dashboard。统计来自 useDashboardAdmin。点击分别进入应用配置、应用权限和数据报表。本页不是列表,不用 AdminListPage。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
@@ -9,17 +9,15 @@ import { onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { ChatDotRound, DataAnalysis, Monitor, User } from '@element-plus/icons-vue';
|
||||
import { ElCard, ElConfigProvider, ElIcon, ElLoading, ElStatistic, ElTag } from 'element-plus';
|
||||
import { ElCard, ElIcon, ElLoading, ElStatistic, ElTag } from 'element-plus';
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import { useDashboardAdmin } from './composables/useDashboardAdmin';
|
||||
|
||||
const vLoading = ElLoading.directive;
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
const {
|
||||
agentCount,
|
||||
@@ -49,7 +47,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<section v-loading="isLoading" class="admin-dash">
|
||||
<h2 class="section-title">{{ t('admin.nav.dashboard') }}</h2>
|
||||
<div v-if="!isLoading" class="admin-dash__grid">
|
||||
@@ -83,7 +80,6 @@ onMounted(() => {
|
||||
</ElCard>
|
||||
</div>
|
||||
</section>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in new issue
Block a user