perf: 优化国际化,路由不再传i18n字段,平台自动读取根目录locales文件夹下文件进行国际化匹配

This commit is contained in:
xiaoxian521
2022-05-11 15:25:01 +08:00
parent f35dea840e
commit 9067d88c3b
37 changed files with 411 additions and 430 deletions

View File

@@ -8,7 +8,6 @@ const componentsRouter = {
meta: {
icon: "menu",
title: $t("menus.hscomponents"),
i18n: true,
rank: 5
},
children: [
@@ -17,8 +16,7 @@ const componentsRouter = {
name: "video",
component: () => import("/@/views/components/video/index.vue"),
meta: {
title: $t("menus.hsvideo"),
i18n: true
title: $t("menus.hsvideo")
}
},
{
@@ -28,7 +26,6 @@ const componentsRouter = {
meta: {
title: $t("menus.hsmap"),
keepAlive: true,
i18n: true,
transition: {
name: "fade"
}
@@ -40,7 +37,6 @@ const componentsRouter = {
component: () => import("/@/views/components/draggable/index.vue"),
meta: {
title: $t("menus.hsdraggable"),
i18n: true,
transition: {
enterTransition: "animate__zoomIn",
leaveTransition: "animate__zoomOut"
@@ -54,7 +50,6 @@ const componentsRouter = {
component: () => import("/@/views/components/split-pane/index.vue"),
meta: {
title: $t("menus.hssplitPane"),
i18n: true,
extraIcon: {
svg: true,
name: "team-iconxinpinrenqiwang"
@@ -66,8 +61,7 @@ const componentsRouter = {
name: "button",
component: () => import("/@/views/components/button/index.vue"),
meta: {
title: $t("menus.hsbutton"),
i18n: true
title: $t("menus.hsbutton")
}
},
{
@@ -75,8 +69,7 @@ const componentsRouter = {
name: "cropping",
component: () => import("/@/views/components/cropping/index.vue"),
meta: {
title: $t("menus.hscropping"),
i18n: true
title: $t("menus.hscropping")
}
},
{
@@ -84,8 +77,7 @@ const componentsRouter = {
name: "countTo",
component: () => import("/@/views/components/count-to/index.vue"),
meta: {
title: $t("menus.hscountTo"),
i18n: true
title: $t("menus.hscountTo")
}
},
{
@@ -93,8 +85,7 @@ const componentsRouter = {
name: "selector",
component: () => import("/@/views/components/selector/index.vue"),
meta: {
title: $t("menus.hsselector"),
i18n: true
title: $t("menus.hsselector")
}
},
{
@@ -102,8 +93,7 @@ const componentsRouter = {
name: "seamlessScroll",
component: () => import("/@/views/components/seamless-scroll/index.vue"),
meta: {
title: $t("menus.hsseamless"),
i18n: true
title: $t("menus.hsseamless")
}
},
{
@@ -111,8 +101,7 @@ const componentsRouter = {
name: "contextmenu",
component: () => import("/@/views/components/contextmenu/index.vue"),
meta: {
title: $t("menus.hscontextmenu"),
i18n: true
title: $t("menus.hscontextmenu")
}
}
]