refactor: ♻️ i18n 工具类方法转换路由 title 方法名优化
Former-commit-id: 7c67972e944b06beec68a3f60fac85d3300bbdda
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
item.redirect === 'noredirect' || index === breadcrumbs.length - 1
|
||||
"
|
||||
class="text-[var(--el-disabled-text-color)]"
|
||||
>{{ translateRouteTitleI18n(item.meta.title) }}</span
|
||||
>{{ translateRouteTitle(item.meta.title) }}</span
|
||||
>
|
||||
<a v-else @click.prevent="handleLink(item)">
|
||||
{{ translateRouteTitleI18n(item.meta.title) }}
|
||||
{{ translateRouteTitle(item.meta.title) }}
|
||||
</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
@@ -22,7 +22,7 @@ import { onBeforeMount, ref, watch } from "vue";
|
||||
import { useRoute, RouteLocationMatched } from "vue-router";
|
||||
import { compile } from "path-to-regexp";
|
||||
import router from "@/router";
|
||||
import { translateRouteTitleI18n } from "@/utils/i18n";
|
||||
import { translateRouteTitle } from "@/utils/i18n";
|
||||
|
||||
const currentRoute = useRoute();
|
||||
const pathCompile = (path: string) => {
|
||||
|
||||
Reference in New Issue
Block a user