mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-11-26 04:23:40 +08:00
feat: 提交非国际化版本代码
This commit is contained in:
@@ -2,7 +2,6 @@ import { getConfig } from "@/config";
|
||||
import { toRouteType } from "./types";
|
||||
import NProgress from "@/utils/progress";
|
||||
import { findIndex } from "lodash-unified";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { sessionKey, type DataInfo } from "@/utils/auth";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
@@ -104,9 +103,8 @@ router.beforeEach((to: toRouteType, _from, next) => {
|
||||
to.matched.some(item => {
|
||||
if (!item.meta.title) return "";
|
||||
const Title = getConfig().Title;
|
||||
if (Title)
|
||||
document.title = `${transformI18n(item.meta.title)} | ${Title}`;
|
||||
else document.title = transformI18n(item.meta.title);
|
||||
if (Title) document.title = `${item.meta.title} | ${Title}`;
|
||||
else document.title = item.meta.title as string;
|
||||
});
|
||||
}
|
||||
if (userInfo) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
|
||||
const errorRouter: RouteConfigsTable = {
|
||||
@@ -6,7 +5,7 @@ const errorRouter: RouteConfigsTable = {
|
||||
redirect: "/error/403",
|
||||
meta: {
|
||||
icon: "information-line",
|
||||
title: $t("menus.hsabnormal"),
|
||||
title: "异常页面",
|
||||
rank: 9
|
||||
},
|
||||
children: [
|
||||
@@ -15,7 +14,7 @@ const errorRouter: RouteConfigsTable = {
|
||||
name: "403",
|
||||
component: () => import("@/views/error/403.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsfourZeroOne")
|
||||
title: "403"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -23,7 +22,7 @@ const errorRouter: RouteConfigsTable = {
|
||||
name: "404",
|
||||
component: () => import("@/views/error/404.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsfourZeroFour")
|
||||
title: "404"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -31,7 +30,7 @@ const errorRouter: RouteConfigsTable = {
|
||||
name: "500",
|
||||
component: () => import("@/views/error/500.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsFive")
|
||||
title: "500"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
const Layout = () => import("@/layout/index.vue");
|
||||
|
||||
@@ -9,7 +8,7 @@ const homeRouter: RouteConfigsTable = {
|
||||
redirect: "/welcome",
|
||||
meta: {
|
||||
icon: "home-filled",
|
||||
title: $t("menus.hshome"),
|
||||
title: "首页",
|
||||
rank: 0
|
||||
},
|
||||
children: [
|
||||
@@ -18,7 +17,7 @@ const homeRouter: RouteConfigsTable = {
|
||||
name: "Welcome",
|
||||
component: () => import("@/views/welcome/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hshome")
|
||||
title: "首页"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import type { RouteConfigsTable } from "/#/index";
|
||||
const Layout = () => import("@/layout/index.vue");
|
||||
|
||||
@@ -8,7 +7,7 @@ const remainingRouter: Array<RouteConfigsTable> = [
|
||||
name: "Login",
|
||||
component: () => import("@/views/login/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hslogin"),
|
||||
title: "登录",
|
||||
showLink: false,
|
||||
rank: 101
|
||||
}
|
||||
@@ -18,7 +17,7 @@ const remainingRouter: Array<RouteConfigsTable> = [
|
||||
component: Layout,
|
||||
meta: {
|
||||
icon: "home-filled",
|
||||
title: $t("menus.hshome"),
|
||||
title: "首页",
|
||||
showLink: false,
|
||||
rank: 104
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user