feat(projects): 增加i18n支持翻译菜单,tab,title

This commit is contained in:
cc
2023-05-13 12:58:35 +08:00
parent a765da6e28
commit 3d48aa8bbe
19 changed files with 116 additions and 33 deletions

View File

@ -9,7 +9,7 @@
v-if="theme.header.crumb.showIcon"
class="inline-block align-text-bottom mr-4px text-16px"
/>
<span>{{ breadcrumb.label }}</span>
<span>{{ breadcrumb.i18nTitle ? t(breadcrumb.i18nTitle) : breadcrumb.label }}</span>
</span>
</n-dropdown>
<template v-else>
@ -19,7 +19,9 @@
class="inline-block align-text-bottom mr-4px text-16px"
:class="{ 'text-#BBBBBB': theme.header.inverted }"
/>
<span :class="{ 'text-#BBBBBB': theme.header.inverted }">{{ breadcrumb.label }}</span>
<span :class="{ 'text-#BBBBBB': theme.header.inverted }">{{
breadcrumb.i18nTitle ? t(breadcrumb.i18nTitle) : breadcrumb.label
}}</span>
</template>
</n-breadcrumb-item>
</template>
@ -33,6 +35,7 @@ import { routePath } from '@/router';
import { useRouteStore, useThemeStore } from '@/store';
import { useRouterPush } from '@/composables';
import { getBreadcrumbByRouteKey } from '@/utils';
import { t } from '@/locales';
defineOptions({ name: 'GlobalBreadcrumb' });