index.js
875 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
43
44
45
import { createRouter, createWebHashHistory } from 'vue-router'
import Login from '../pages/Login.vue'
import Upload from '../pages/Upload.vue'
import QualityList from '../pages/QualityList.vue'
import QualityDetail from '../pages/QualityDetail.vue'
import StaffList from '../pages/StaffList.vue'
const routes = [
{
path: '/',
redirect: '/login'
},
{
path: '/login',
name: 'login',
component: Login
},
{
path: '/upload',
name: 'upload',
component: Upload
},
{
path: '/quality-list',
name: 'quality-list',
component: QualityList
},
{
path: '/quality-detail',
name: 'quality-detail',
component: QualityDetail
},
{
path: '/staff-list',
name: 'staff-list',
component: StaffList
},
]
const router = createRouter({
history: createWebHashHistory('/'),
routes
})
export default router