mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-12 19:53:41 +08:00
feat(projects): 增加i18n支持翻译菜单,tab,title
This commit is contained in:
@@ -20,6 +20,7 @@ import { useRoute } from 'vue-router';
|
||||
import type { MenuOption } from 'naive-ui';
|
||||
import { useRouteStore, useThemeStore } from '@/store';
|
||||
import { useRouterPush } from '@/composables';
|
||||
import { translateMenuLabel } from '@/utils';
|
||||
|
||||
defineOptions({ name: 'HeaderMenu' });
|
||||
|
||||
@@ -28,7 +29,7 @@ const routeStore = useRouteStore();
|
||||
const theme = useThemeStore();
|
||||
const { routerPush } = useRouterPush();
|
||||
|
||||
const menus = computed(() => routeStore.menus as App.GlobalMenuOption[]);
|
||||
const menus = computed(() => translateMenuLabel(routeStore.menus as App.GlobalMenuOption[]));
|
||||
const activeKey = computed(() => (route.meta?.activeMenu ? route.meta.activeMenu : route.name) as string);
|
||||
|
||||
function handleUpdateMenu(_key: string, item: MenuOption) {
|
||||
|
||||
Reference in New Issue
Block a user