mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-30 15:16:42 +08:00
fix(projects): 修复面包屑导航下拉菜单语言显示问题
This commit is contained in:
parent
7b746fa053
commit
f3cad0e97c
@ -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) {
|
||||
|
2
src/typings/system.d.ts
vendored
2
src/typings/system.d.ts
vendored
@ -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的路由 */
|
||||
|
Loading…
Reference in New Issue
Block a user