Browse Source

chore: 路由相关设置

outaozhen 4 years ago
parent
commit
af0184894e
4 changed files with 39 additions and 2 deletions
  1. 4 2
      config/routes.ts
  2. 12 0
      src/pages/Role/Customer/index.tsx
  3. 12 0
      src/pages/Role/System/index.tsx
  4. 11 0
      src/pages/Role/index.tsx

+ 4 - 2
config/routes.ts

@@ -25,10 +25,12 @@
     path: '/role',
     path: '/role',
     name: 'role',
     name: 'role',
     icon: 'UserOutlined',
     icon: 'UserOutlined',
-    access: 'canAdmin',
-    component: './Role',
     routes: [
     routes: [
       {
       {
+        path: '/role',
+        redirect: '/Role/System'
+      },
+      {
         path: '/role/system',
         path: '/role/system',
         name: 'system',
         name: 'system',
         component: './Role/System',
         component: './Role/System',

+ 12 - 0
src/pages/Role/Customer/index.tsx

@@ -0,0 +1,12 @@
+import { Card } from 'antd'
+import React from 'react'
+
+const index = () => {
+  return (
+    <div>
+      <Card>客户管理</Card>
+    </div>
+  )
+}
+
+export default index

+ 12 - 0
src/pages/Role/System/index.tsx

@@ -0,0 +1,12 @@
+import { Card } from 'antd'
+import React from 'react'
+
+const index = () => {
+  return (
+    <div>
+      <Card>系统管理</Card>
+    </div>
+  )
+}
+
+export default index

+ 11 - 0
src/pages/Role/index.tsx

@@ -0,0 +1,11 @@
+import React from 'react'
+
+const index = () => {
+  return (
+    <div>
+      <h2>角色权限管理</h2>
+    </div>
+  )
+}
+
+export default index