mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
perf: 优化中英文翻译与切换
This commit is contained in:
@@ -1,44 +1,44 @@
|
||||
import LayoutBasic from "/@/layout/layout-basic.vue";
|
||||
|
||||
import type { RouteRecordRaw } from "vue-router";
|
||||
import i18n from '/@/locales/i18n';
|
||||
import i18n from "/@/locales/i18n";
|
||||
|
||||
import { mergeRouteModules } from "/@/vben/utils";
|
||||
const dynamicRouteFiles = import.meta.glob("./modules/**/*.ts*", {
|
||||
eager: true,
|
||||
eager: true,
|
||||
});
|
||||
|
||||
/** 动态路由 */
|
||||
const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles);
|
||||
export const frameworkResource = [
|
||||
{
|
||||
title: i18n.global.t("certd.framework.title"),
|
||||
name: "root",
|
||||
path: "/",
|
||||
redirect: "/index",
|
||||
component: LayoutBasic,
|
||||
meta: {
|
||||
icon: "ion:accessibility",
|
||||
hideInBreadcrumb: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
title: i18n.global.t("certd.framework.home"),
|
||||
name: "index",
|
||||
path: "/index",
|
||||
component: "/framework/home/index.vue",
|
||||
meta: {
|
||||
fixedAside: true,
|
||||
showOnHeader: false,
|
||||
icon: "ion:home-outline",
|
||||
auth: true,
|
||||
},
|
||||
},
|
||||
// @ts-ignore
|
||||
{
|
||||
title: "certd.framework.title",
|
||||
name: "root",
|
||||
path: "/",
|
||||
redirect: "/index",
|
||||
component: LayoutBasic,
|
||||
meta: {
|
||||
icon: "ion:accessibility",
|
||||
hideInBreadcrumb: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
title: "certd.framework.home",
|
||||
name: "index",
|
||||
path: "/index",
|
||||
component: "/framework/home/index.vue",
|
||||
meta: {
|
||||
fixedAside: true,
|
||||
showOnHeader: false,
|
||||
icon: "ion:home-outline",
|
||||
auth: true,
|
||||
},
|
||||
},
|
||||
// @ts-ignore
|
||||
|
||||
...dynamicRoutes,
|
||||
],
|
||||
},
|
||||
...dynamicRoutes,
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
console.assert(frameworkResource.length === 1, "frameworkResource数组长度只能为1,你只能配置framework路由的子路由");
|
||||
|
||||
Reference in New Issue
Block a user