refactor: ♻️ i18n 工具类方法转换路由 title 方法名优化

Former-commit-id: 7c67972e944b06beec68a3f60fac85d3300bbdda
This commit is contained in:
hxr
2023-10-22 00:07:03 +08:00
parent ab0851d439
commit ab30d838b2
4 changed files with 8 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
import { usePermissionStore } from "@/store/modules/permission";
import variables from "@/styles/variables.module.scss";
import { useAppStore } from "@/store/modules/app";
import { translateRouteTitleI18n } from "@/utils/i18n";
import { translateRouteTitle } from "@/utils/i18n";
import { useRouter } from "vue-router";
const appStore = useAppStore();
const activePath = computed(() => appStore.activeTopMenu);
@@ -56,7 +56,7 @@ onMounted(() => {
<span v-if="route.path === '/'"> 首页 </span>
<template v-else>
<span v-if="route.meta && route.meta.title">
{{ translateRouteTitleI18n(route.meta.title) }}
{{ translateRouteTitle(route.meta.title) }}
</span>
</template>
</template>