perf: 同步完整版代码

This commit is contained in:
xiaoxian521
2022-03-14 14:49:02 +08:00
parent 79ebfb9284
commit f5b387231a
49 changed files with 1611 additions and 1008 deletions

View File

@@ -3,11 +3,10 @@ const Layout = () => import("/@/layout/index.vue");
const errorRouter = {
path: "/error",
name: "error",
component: Layout,
redirect: "/error/403",
meta: {
icon: "position",
icon: "information-line",
title: $t("menus.hserror"),
i18n: true,
rank: 9

View File

@@ -1,25 +0,0 @@
import { $t } from "/@/plugins/i18n";
const Layout = () => import("/@/layout/index.vue");
const externalLink = {
path: "/externals",
component: Layout,
meta: {
icon: "link",
title: $t("menus.externalLink"),
i18n: true,
rank: 190
},
children: [
{
path: "/external",
name: "https://pure-admin-doc.vercel.app",
meta: {
title: $t("menus.externalLink"),
i18n: true
}
}
]
};
export default externalLink;

View File

@@ -1,7 +1,6 @@
// 静态路由
import homeRouter from "./home";
import errorRouter from "./error";
import externalLink from "./externalLink";
import remainingRouter from "./remaining";
import { RouteRecordRaw, RouteComponent } from "vue-router";
@@ -13,7 +12,7 @@ import {
import { buildHierarchyTree } from "/@/utils/tree";
// 原始静态路由(未做任何处理)
const routes = [homeRouter, errorRouter, externalLink];
const routes = [homeRouter, errorRouter];
// 导出处理后的静态路由(三级及以上的路由全部拍成二级)
export const constantRoutes: Array<RouteRecordRaw> = formatTwoStageRoutes(

View File

@@ -15,7 +15,6 @@ const remainingRouter = [
},
{
path: "/redirect",
name: "redirect",
component: Layout,
meta: {
icon: "home-filled",
@@ -28,7 +27,7 @@ const remainingRouter = [
{
path: "/redirect/:path(.*)",
name: "redirect",
component: () => import("/@/views/redirect.vue")
component: () => import("/@/layout/redirect.vue")
}
]
}