fix(menu): top menu and breadcrumb show wrong (#3703)
This commit is contained in:
parent
ea863f2d2d
commit
573fd53b4e
|
|
@ -19,7 +19,7 @@
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { prefixCls } = useDesign('basic-menu-item-content');
|
const { prefixCls } = useDesign('basic-menu-item-content');
|
||||||
|
|
||||||
const getI18nName = computed(() => t(props.item?.name));
|
const getI18nName = computed(() => t(props.item?.meta?.title || props.item?.name));
|
||||||
const getIcon = computed(() => (props.item?.img ? undefined : props.item?.icon));
|
const getIcon = computed(() => (props.item?.img ? undefined : props.item?.icon));
|
||||||
const getImg = computed(() => props.item?.img);
|
const getImg = computed(() => props.item?.img);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@
|
||||||
<template #itemRender="{ route, routes: routesMatched, paths }">
|
<template #itemRender="{ route, routes: routesMatched, paths }">
|
||||||
<Icon :icon="getIcon(route)" v-if="getShowBreadCrumbIcon && getIcon(route)" />
|
<Icon :icon="getIcon(route)" v-if="getShowBreadCrumbIcon && getIcon(route)" />
|
||||||
<span v-if="!hasRedirect(routesMatched, route)">
|
<span v-if="!hasRedirect(routesMatched, route)">
|
||||||
{{ t(route.name || route.meta.title) }}
|
{{ t(route.meta.title || route.name) }}
|
||||||
</span>
|
</span>
|
||||||
<router-link v-else to="" @click="handleClick(route, paths, $event as Event)">
|
<router-link v-else to="" @click="handleClick(route, paths, $event as Event)">
|
||||||
{{ t(route.name || route.meta.title) }}
|
{{ t(route.meta.title || route.name) }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
</a-breadcrumb>
|
</a-breadcrumb>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue