Blame view

src/router/index.ts 1.69 KB
sanmu authored
1
2
3
4
5
import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Contact from '../views/Contact.vue'
import ProductList from '../views/ProductList.vue'
import ProductDetail from '../views/ProductDetail.vue'
sanmu authored
6
7
8
import Equipment from '../views/Equipment.vue'
import Customize from '../views/Customize.vue'
import Test from '../views/Test.vue'
sanmu authored
9
import Pack from '../views/Pack.vue'
sanmu authored
10
import About from '../views/About.vue'
sanmu authored
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/products/detail/:id',
      name: 'detail',
      component: ProductDetail
    },
    {
      path: '/products',
      name: 'products',
      component: ProductList
    },
    {
      path: '/contact',
      name: 'contact',
      component: Contact
sanmu authored
34
35
36
37
38
39
40
    },
    {
      path: '/contact',
      name: 'contact',
      component: Contact
    },
    {
sanmu authored
41
42
43
44
45
      path: '/about',
      name: 'about',
      component: About
    },
    {
sanmu authored
46
47
48
49
50
51
52
53
54
55
56
57
58
      path: '/equipment',
      name: 'equipment',
      component: Equipment
    },
    {
      path: '/customize',
      name: 'customize',
      component: Customize
    },
    {
      path: '/test',
      name: 'test',
      component: Test
sanmu authored
59
60
61
62
63
    },
    {
      path: '/pack',
      name: 'pack',
      component: Pack
sanmu authored
64
65
66
67
68
69
70
71
72
73
74
75
76
    }
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   // component: () => import('../views/AboutView.vue')
    // }
  ]
})

export default router