From 52ee7c6f4566e101cf3fb3b0fbb431e4697e5b15 Mon Sep 17 00:00:00 2001 From: Fine Date: Sat, 22 Jul 2023 13:26:57 +0800 Subject: [PATCH] fix: menus title --- src/layout/components/SideBar.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/layout/components/SideBar.vue b/src/layout/components/SideBar.vue index 2bf51b0c..9e54bdf2 100644 --- a/src/layout/components/SideBar.vue +++ b/src/layout/components/SideBar.vue @@ -36,14 +36,16 @@ limitations under the License. --> - {{ t(menu.meta.i18nKey) }} + {{ te(menu.meta.i18nKey) ? t(menu.meta.i18nKey) : menu.meta.title }} - {{ t(m.meta && m.meta.i18nKey) }} + + {{ m.meta && (te(menu.meta.i18nKey) ? t(menu.meta.i18nKey) : menu.meta.title) }} + @@ -56,7 +58,9 @@ limitations under the License. --> @@ -75,7 +79,7 @@ limitations under the License. --> import { useAppStoreWithOut } from "@/store/modules/app"; /*global Recordable*/ - const { t } = useI18n(); + const { t, te } = useI18n(); const appStore = useAppStoreWithOut(); const router = useRouter(); const name = ref(String(router.currentRoute.value.name)); @@ -87,7 +91,7 @@ limitations under the License. --> const isCollapse = ref(true); const showMenu = ref(true); const open = ref(false); - + console.log(routes.value); if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) { appStore.setIsMobile(true); } else {