Skip to content

Commit

Permalink
perf: 优化权限示例页面名称
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Nov 28, 2024
1 parent 97030fa commit 6a39d67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [
{
path: "/permission",
component: Layouts,
redirect: "/permission/page",
redirect: "/permission/page-level",
name: "Permission",
meta: {
title: "权限演示",
Expand All @@ -203,19 +203,19 @@ export const dynamicRoutes: RouteRecordRaw[] = [
},
children: [
{
path: "page",
component: () => import("@/pages/demo/permission/page.vue"),
name: "PagePermission",
path: "page-level",
component: () => import("@/pages/demo/permission/page-level.vue"),
name: "PermissionPageLevel",
meta: {
title: "页面级",
// 或者在子路由中设置角色
roles: ["admin"]
}
},
{
path: "directive",
component: () => import("@/pages/demo/permission/directive.vue"),
name: "DirectivePermission",
path: "button-level",
component: () => import("@/pages/demo/permission/button-level.vue"),
name: "PermissionButtonLevel",
meta: {
title: "按钮级",
// 如果未设置角色,则表示:该页面不需要权限,但会继承根路由的角色
Expand Down

0 comments on commit 6a39d67

Please sign in to comment.