diff --git a/src/layouts/common/global-header/components/global-breadcrumb.vue b/src/layouts/common/global-header/components/global-breadcrumb.vue
index 8256ef71..b59c5d1a 100644
--- a/src/layouts/common/global-header/components/global-breadcrumb.vue
+++ b/src/layouts/common/global-header/components/global-breadcrumb.vue
@@ -9,7 +9,7 @@
v-if="theme.header.crumb.showIcon"
class="inline-block align-text-bottom mr-4px text-16px"
/>
- {{ breadcrumb.i18nTitle ? t(breadcrumb.i18nTitle) : breadcrumb.label }}
+ {{ breadcrumb.label }}
@@ -20,7 +20,7 @@
:class="{ 'text-#BBBBBB': theme.header.inverted }"
/>
- {{ breadcrumb.i18nTitle ? t(breadcrumb.i18nTitle) : breadcrumb.label }}
+ {{ breadcrumb.label }}
@@ -45,7 +45,13 @@ const routeStore = useRouteStore();
const { routerPush } = useRouterPush();
const breadcrumbs = computed(() =>
- getBreadcrumbByRouteKey(route.name as string, routeStore.menus as App.GlobalMenuOption[], routePath('root'))
+ getBreadcrumbByRouteKey(route.name as string, routeStore.menus as App.GlobalMenuOption[], routePath('root')).map(
+ item => ({
+ ...item,
+ label: item.i18nTitle ? t(item.i18nTitle) : item.label,
+ options: item.options?.map(oItem => ({ ...oItem, label: oItem.i18nTitle ? t(oItem.i18nTitle) : oItem.label }))
+ })
+ )
);
function dropdownSelect(key: string) {
diff --git a/src/typings/system.d.ts b/src/typings/system.d.ts
index 5ef41072..c47f6ccd 100644
--- a/src/typings/system.d.ts
+++ b/src/typings/system.d.ts
@@ -254,7 +254,7 @@ declare namespace App {
hasChildren: boolean;
icon?: import('vue').Component;
i18nTitle?: string;
- options?: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
+ options?: (import('naive-ui/es/dropdown/src/interface').DropdownMixedOption & { i18nTitle?: string })[];
};
/** 多页签Tab的路由 */