fix(projects): 修复面包屑导航下拉菜单语言显示问题

This commit is contained in:
cc 2023-05-25 21:05:00 +08:00
parent 7b746fa053
commit f3cad0e97c
2 changed files with 8 additions and 2 deletions

View File

@ -45,7 +45,13 @@ const routeStore = useRouteStore();
const { routerPush } = useRouterPush(); const { routerPush } = useRouterPush();
const breadcrumbs = computed(() => 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) { function dropdownSelect(key: string) {

View File

@ -254,7 +254,7 @@ declare namespace App {
hasChildren: boolean; hasChildren: boolean;
icon?: import('vue').Component; icon?: import('vue').Component;
i18nTitle?: string; i18nTitle?: string;
options?: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[]; options?: (import('naive-ui/es/dropdown/src/interface').DropdownMixedOption & { i18nTitle?: string })[];
}; };
/** 多页签Tab的路由 */ /** 多页签Tab的路由 */