mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-15 14:03:36 +08:00
fix: i18n
This commit is contained in:
@@ -208,14 +208,15 @@ router.beforeEach((to, _from, next) => {
|
||||
const name = storageSession.getItem("info");
|
||||
NProgress.start();
|
||||
const externalLink = to?.redirectedFrom?.fullPath;
|
||||
// @ts-ignore
|
||||
// const { t } = i18n.global;
|
||||
// @ts-ignore
|
||||
if (!externalLink)
|
||||
to.meta.title
|
||||
? // @ts-ignore
|
||||
(document.title = transformI18n(to.meta.title, to.meta.i18n))
|
||||
: "";
|
||||
to.matched.some(item => {
|
||||
item.meta.title
|
||||
? (document.title = transformI18n(
|
||||
item.meta.title as string,
|
||||
item.meta?.i18n as boolean
|
||||
))
|
||||
: "";
|
||||
});
|
||||
if (name) {
|
||||
if (_from?.name) {
|
||||
// 如果路由包含http 则是超链接 反之是普通路由
|
||||
|
||||
Reference in New Issue
Block a user