feat: 模拟后台返回不同角色路由生成动态路由

This commit is contained in:
xiaoxian521
2021-05-27 23:36:46 +08:00
parent b554356ba1
commit 07aff1fcfc
22 changed files with 297 additions and 92 deletions

View File

@@ -8,6 +8,7 @@ const remainingRouter = [
meta: {
title: "message.hslogin",
showLink: false,
rank: 101,
},
},
{
@@ -17,11 +18,13 @@ const remainingRouter = [
meta: {
title: "message.hsregister",
showLink: false,
rank: 102,
},
},
{
// 找不到路由重定向到404页面
path: "/:pathMatch(.*)",
name: "pathMatch",
component: Layout,
redirect: "/error/404",
meta: {
@@ -29,14 +32,24 @@ const remainingRouter = [
title: "message.hshome",
showLink: false,
savedPosition: false,
rank: 103,
},
},
{
path: "/redirect",
name: "redirect",
component: Layout,
meta: {
icon: "el-icon-s-home",
title: "message.hshome",
showLink: false,
savedPosition: false,
rank: 104,
},
children: [
{
path: "/redirect/:path(.*)",
name: "redirect",
component: () => import("/@/views/redirect.vue"),
},
],