feat: 提交非国际化版本代码

This commit is contained in:
xiaoxian521
2022-10-28 15:32:31 +08:00
parent b811256830
commit 761b0e5ec2
50 changed files with 95 additions and 854 deletions

View File

@@ -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) {

View File

@@ -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"
}
}
]

View File

@@ -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: "首页"
}
}
]

View File

@@ -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
},