mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
perf: 优化国际化
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const componentsRouter = {
|
||||
@@ -7,7 +8,7 @@ const componentsRouter = {
|
||||
redirect: "/components/video",
|
||||
meta: {
|
||||
icon: "Menu",
|
||||
title: "message.hscomponents",
|
||||
title: $t("menus.hscomponents"),
|
||||
i18n: true,
|
||||
showLink: true,
|
||||
rank: 4
|
||||
@@ -18,7 +19,7 @@ const componentsRouter = {
|
||||
name: "video",
|
||||
component: () => import("/@/views/components/video/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsvideo",
|
||||
title: $t("menus.hsvideo"),
|
||||
showLink: true,
|
||||
i18n: true
|
||||
}
|
||||
@@ -28,7 +29,7 @@ const componentsRouter = {
|
||||
name: "map",
|
||||
component: () => import("/@/views/components/map/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsmap",
|
||||
title: $t("menus.hsmap"),
|
||||
showLink: true,
|
||||
keepAlive: true,
|
||||
i18n: true,
|
||||
@@ -42,7 +43,7 @@ const componentsRouter = {
|
||||
name: "draggable",
|
||||
component: () => import("/@/views/components/draggable/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsdraggable",
|
||||
title: $t("menus.hsdraggable"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
transition: {
|
||||
@@ -57,7 +58,7 @@ const componentsRouter = {
|
||||
name: "splitPane",
|
||||
component: () => import("/@/views/components/split-pane/index.vue"),
|
||||
meta: {
|
||||
title: "message.hssplitPane",
|
||||
title: $t("menus.hssplitPane"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
extraIcon: {
|
||||
@@ -71,7 +72,7 @@ const componentsRouter = {
|
||||
name: "button",
|
||||
component: () => import("/@/views/components/button/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsbutton",
|
||||
title: $t("menus.hsbutton"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
@@ -81,7 +82,7 @@ const componentsRouter = {
|
||||
name: "cropping",
|
||||
component: () => import("/@/views/components/cropping/index.vue"),
|
||||
meta: {
|
||||
title: "message.hscropping",
|
||||
title: $t("menus.hscropping"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
@@ -91,7 +92,7 @@ const componentsRouter = {
|
||||
name: "countTo",
|
||||
component: () => import("/@/views/components/count-to/index.vue"),
|
||||
meta: {
|
||||
title: "message.hscountTo",
|
||||
title: $t("menus.hscountTo"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
@@ -101,7 +102,7 @@ const componentsRouter = {
|
||||
name: "selector",
|
||||
component: () => import("/@/views/components/selector/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsselector",
|
||||
title: $t("menus.hsselector"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
@@ -111,7 +112,7 @@ const componentsRouter = {
|
||||
name: "seamlessScroll",
|
||||
component: () => import("/@/views/components/seamless-scroll/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsseamless",
|
||||
title: $t("menus.hsseamless"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
@@ -121,7 +122,7 @@ const componentsRouter = {
|
||||
name: "contextmenu",
|
||||
component: () => import("/@/views/components/contextmenu/index.vue"),
|
||||
meta: {
|
||||
title: "message.hscontextmenu",
|
||||
title: $t("menus.hscontextmenu"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const editorRouter = {
|
||||
@@ -7,7 +8,7 @@ const editorRouter = {
|
||||
redirect: "/editor/index",
|
||||
meta: {
|
||||
icon: "Edit",
|
||||
title: "message.hseditor",
|
||||
title: $t("menus.hseditor"),
|
||||
i18n: true,
|
||||
showLink: true,
|
||||
rank: 2
|
||||
@@ -18,7 +19,7 @@ const editorRouter = {
|
||||
name: "reEditor",
|
||||
component: () => import("/@/views/editor/index.vue"),
|
||||
meta: {
|
||||
title: "message.hseditor",
|
||||
title: $t("menus.hseditor"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
keepAlive: true,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const errorRouter = {
|
||||
@@ -7,7 +8,7 @@ const errorRouter = {
|
||||
redirect: "/error/401",
|
||||
meta: {
|
||||
icon: "Position",
|
||||
title: "message.hserror",
|
||||
title: $t("menus.hserror"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 7
|
||||
@@ -18,7 +19,7 @@ const errorRouter = {
|
||||
name: "401",
|
||||
component: () => import("/@/views/error/401.vue"),
|
||||
meta: {
|
||||
title: "message.hsfourZeroOne",
|
||||
title: $t("menus.hsfourZeroOne"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
@@ -28,7 +29,7 @@ const errorRouter = {
|
||||
name: "404",
|
||||
component: () => import("/@/views/error/404.vue"),
|
||||
meta: {
|
||||
title: "message.hsfourZeroFour",
|
||||
title: $t("menus.hsfourZeroFour"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const externalLink = {
|
||||
@@ -6,7 +7,7 @@ const externalLink = {
|
||||
component: Layout,
|
||||
meta: {
|
||||
icon: "Link",
|
||||
title: "message.externalLink",
|
||||
title: $t("menus.externalLink"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 190
|
||||
@@ -15,7 +16,7 @@ const externalLink = {
|
||||
{
|
||||
path: "https://github.com/xiaoxian521/vue-pure-admin",
|
||||
meta: {
|
||||
title: "message.externalLink",
|
||||
title: $t("menus.externalLink"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 191
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const flowChartRouter = {
|
||||
@@ -7,7 +8,7 @@ const flowChartRouter = {
|
||||
redirect: "/flowChart/index",
|
||||
meta: {
|
||||
icon: "SetUp",
|
||||
title: "message.hsflowChart",
|
||||
title: $t("menus.hsflowChart"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 1
|
||||
@@ -18,7 +19,7 @@ const flowChartRouter = {
|
||||
name: "flowChart",
|
||||
component: () => import("/@/views/flow-chart/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsflowChart",
|
||||
title: $t("menus.hsflowChart"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const guideRouter = {
|
||||
@@ -7,7 +8,7 @@ const guideRouter = {
|
||||
redirect: "/guide/index",
|
||||
meta: {
|
||||
icon: "Guide",
|
||||
title: "message.hsguide",
|
||||
title: $t("menus.hsguide"),
|
||||
i18n: true,
|
||||
showLink: true,
|
||||
rank: 10
|
||||
@@ -18,7 +19,7 @@ const guideRouter = {
|
||||
name: "reGuide",
|
||||
component: () => import("/@/views/guide/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsguide",
|
||||
title: $t("menus.hsguide"),
|
||||
showLink: true,
|
||||
i18n: true
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const homeRouter = {
|
||||
@@ -7,7 +8,7 @@ const homeRouter = {
|
||||
redirect: "/welcome",
|
||||
meta: {
|
||||
icon: "HomeFilled",
|
||||
title: "message.hshome",
|
||||
title: $t("menus.hshome"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 0
|
||||
@@ -18,7 +19,7 @@ const homeRouter = {
|
||||
name: "welcome",
|
||||
component: () => import("/@/views/welcome.vue"),
|
||||
meta: {
|
||||
title: "message.hshome",
|
||||
title: $t("menus.hshome"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const menuTreeRouter = {
|
||||
@@ -7,7 +8,7 @@ const menuTreeRouter = {
|
||||
redirect: "/menuTree/index",
|
||||
meta: {
|
||||
icon: "RI-node-tree",
|
||||
title: "message.hsMenuTree",
|
||||
title: $t("menus.hsMenuTree"),
|
||||
i18n: true,
|
||||
showLink: true,
|
||||
rank: 9
|
||||
@@ -18,7 +19,7 @@ const menuTreeRouter = {
|
||||
name: "reMenuTree",
|
||||
component: () => import("/@/views/menu-tree/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsMenuTree",
|
||||
title: $t("menus.hsMenuTree"),
|
||||
showLink: true,
|
||||
i18n: true
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const nestedRouter = {
|
||||
@@ -6,7 +7,7 @@ const nestedRouter = {
|
||||
redirect: "/nested/menu1/menu1-1",
|
||||
name: "Nested",
|
||||
meta: {
|
||||
title: "message.hsmenus",
|
||||
title: $t("menus.hsmenus"),
|
||||
icon: "Histogram",
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
@@ -18,7 +19,7 @@ const nestedRouter = {
|
||||
component: () => import("/@/layout/routerView/parent.vue"),
|
||||
name: "Menu1",
|
||||
meta: {
|
||||
title: "message.hsmenu1",
|
||||
title: $t("menus.hsmenu1"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
keepAlive: true
|
||||
@@ -30,7 +31,7 @@ const nestedRouter = {
|
||||
component: () => import("/@/views/nested/menu1/menu1-1/index.vue"),
|
||||
name: "Menu1-1",
|
||||
meta: {
|
||||
title: "message.hsmenu1-1",
|
||||
title: $t("menus.hsmenu1-1"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
keepAlive: true
|
||||
@@ -42,7 +43,7 @@ const nestedRouter = {
|
||||
name: "Menu1-2",
|
||||
redirect: "/nested/menu1/menu1-2/menu1-2-1",
|
||||
meta: {
|
||||
title: "message.hsmenu1-2",
|
||||
title: $t("menus.hsmenu1-2"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
keepAlive: true
|
||||
@@ -54,7 +55,7 @@ const nestedRouter = {
|
||||
import("/@/views/nested/menu1/menu1-2/menu1-2-1/index.vue"),
|
||||
name: "Menu1-2-1",
|
||||
meta: {
|
||||
title: "message.hsmenu1-2-1",
|
||||
title: $t("menus.hsmenu1-2-1"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
keepAlive: true
|
||||
@@ -66,7 +67,7 @@ const nestedRouter = {
|
||||
import("/@/views/nested/menu1/menu1-2/menu1-2-2/index.vue"),
|
||||
name: "Menu1-2-2",
|
||||
meta: {
|
||||
title: "message.hsmenu1-2-2",
|
||||
title: $t("menus.hsmenu1-2-2"),
|
||||
showLink: true,
|
||||
keepAlive: true,
|
||||
i18n: true,
|
||||
@@ -83,7 +84,7 @@ const nestedRouter = {
|
||||
component: () => import("/@/views/nested/menu1/menu1-3/index.vue"),
|
||||
name: "Menu1-3",
|
||||
meta: {
|
||||
title: "message.hsmenu1-3",
|
||||
title: $t("menus.hsmenu1-3"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
keepAlive: true
|
||||
@@ -96,7 +97,7 @@ const nestedRouter = {
|
||||
name: "Menu2",
|
||||
component: () => import("/@/views/nested/menu2/index.vue"),
|
||||
meta: {
|
||||
title: "message.hsmenu2",
|
||||
title: $t("menus.hsmenu2"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
keepAlive: true
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { $t } from "/@/plugins/i18n";
|
||||
import Layout from "/@/layout/index.vue";
|
||||
|
||||
const remainingRouter = [
|
||||
@@ -6,7 +7,7 @@ const remainingRouter = [
|
||||
name: "login",
|
||||
component: () => import("/@/views/login.vue"),
|
||||
meta: {
|
||||
title: "message.hslogin",
|
||||
title: $t("menus.hslogin"),
|
||||
showLink: false,
|
||||
i18n: true,
|
||||
rank: 101
|
||||
@@ -18,7 +19,7 @@ const remainingRouter = [
|
||||
component: Layout,
|
||||
meta: {
|
||||
icon: "HomeFilled",
|
||||
title: "message.hshome",
|
||||
title: $t("menus.hshome"),
|
||||
i18n: true,
|
||||
showLink: false,
|
||||
rank: 104
|
||||
|
||||
Reference in New Issue
Block a user