From 3fd9e976c2e77fb72e3058d05b97589901a02855 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 10 Jun 2025 16:53:35 +0800 Subject: [PATCH] perf: Menu Language --- frontend/src/components/layout/index.vue | 15 +++++++-------- frontend/src/i18n/en.json | 8 ++++---- frontend/src/i18n/zh-CN.json | 8 ++++---- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/layout/index.vue b/frontend/src/components/layout/index.vue index 4cfa3944..2fcfbe73 100644 --- a/frontend/src/components/layout/index.vue +++ b/frontend/src/components/layout/index.vue @@ -37,14 +37,13 @@ - {{ item.meta.title }} + {{ t(`menu.${item.meta.title}`) }}
- - {{ t('common.system_manage') }} + {{ t('common.system_manage') }}
@@ -59,12 +58,11 @@ - +
-
@@ -94,7 +92,7 @@ - System manage + {{ t('common.system_manage') }}
@@ -126,7 +124,7 @@ - {{ item.meta.title }} + {{ t(`menu.${item.meta.title}`) }} @@ -175,7 +173,8 @@ const routerList = computed(() => { }) const sysRouterList = computed(() => { - return router.getRoutes().filter(route => route.path.includes('/system')) + const result = router.getRoutes().filter(route => route.path.includes('/system') && !route.redirect) + return result }) const showSubmenu = computed(() => { diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index fb51d1e9..5ccd1dc1 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -1,9 +1,9 @@ { "menu": { - "dashboard": "Dashboard", - "chat": "Chat", - "datasource": "Data Source", - "system": "System" + "Data Q&A": "Data Q&A", + "Data Connections": "Data Connections", + "Dashboard": "Dashboard", + "AI Model Configuration": "AI Model Configuration" }, "common": { "back": "Back", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 7369b96a..1b5b8b34 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -1,9 +1,9 @@ { "menu": { - "dashboard": "仪表盘", - "chat": "聊天", - "datasource": "数据源", - "system": "系统" + "Data Q&A": "智能问数", + "Data Connections": "数据源", + "Dashboard": "仪表盘", + "AI Model Configuration": "模型配置" }, "common": { "back": "返回",