forked from vueComponent/pro-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrouter.ts
More file actions
63 lines (61 loc) · 1.68 KB
/
router.ts
File metadata and controls
63 lines (61 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { createRouter, createWebHistory } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';
import BasicLayout from './layouts/BasicLayout.vue';
import RouteView from './layouts/RouteView.vue';
const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'index',
meta: { title: 'Home' },
component: BasicLayout,
redirect: '/dashboard',
children: [
{
path: '/dashboard',
name: 'dashboard',
meta: { title: 'Dashboard', icon: 'DashboardOutlined' },
redirect: '/dashboard/monitor',
component: RouteView,
children: [
{
path: 'workspace',
name: 'workspace',
meta: { title: 'Workspace', icon: 'icon-antdesign' },
component: () => import('./views/page1.vue'),
},
{
path: 'monitor',
name: 'monitor',
meta: { title: 'Monitor', icon: 'icon-icon-test' },
component: () => import('./views/page2.vue'),
},
],
},
{
path: '/form',
name: 'form',
meta: { title: 'Form', icon: 'FormOutlined' },
redirect: '/form/basic-form',
component: RouteView,
children: [
{
path: 'basic-form',
name: 'basic-form',
meta: { title: 'Basic Form' },
component: () => import('./views/page1.vue'),
},
],
},
{
path: '/single',
name: 'single',
meta: { title: 'Single', icon: 'SettingOutlined' },
component: () => import('./views/page1.vue'),
},
],
},
];
export default createRouter({
history: createWebHistory(),
routes,
});