|
@@ -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 则是超链接 反之是普通路由
|