index.ts
970 Bytes
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
import { createRouter, createWebHashHistory } from 'vue-router'
import { defaultWorkbenchPath } from './navigation'
const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
redirect: defaultWorkbenchPath,
},
{
path: '/dashboard',
component: () => import('@/views/DashboardView.vue'),
},
{
path: '/tasks',
component: () => import('@/views/TaskCenterView.vue'),
},
{
path: '/crawler',
component: () => import('@/views/CrawlerManagementView.vue'),
},
{
path: '/engines',
component: () => import('@/views/EngineWorkspaceView.vue'),
},
{
path: '/reports',
component: () => import('@/views/ReportCenterView.vue'),
},
{
path: '/settings',
component: () => import('@/views/ConfigCenterView.vue'),
},
],
scrollBehavior() {
return { top: 0 }
},
})
export default router