router.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import Home from './views/Home.vue'
  4. Vue.use(Router)
  5. export default new Router({
  6. mode: 'history',
  7. linkActiveClass: 'active',
  8. base: process.env.BASE_URL,
  9. routes: [
  10. {
  11. path: '/',
  12. name: 'home',
  13. component: Home
  14. },
  15. {
  16. path: '/about',
  17. name: 'about',
  18. // route level code-splitting
  19. // this generates a separate chunk (about.[hash].js) for this route
  20. // which is lazy-loaded when the route is visited.
  21. component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
  22. },
  23. {
  24. path: '/download',
  25. name: 'download',
  26. // route level code-splitting
  27. // this generates a separate chunk (about.[hash].js) for this route
  28. // which is lazy-loaded when the route is visited.
  29. component: () => import(/* webpackChunkName: "download" */ './views/Download.vue')
  30. },
  31. {
  32. path: '/docs',
  33. name: 'docs',
  34. // route level code-splitting
  35. // this generates a separate chunk (about.[hash].js) for this route
  36. // which is lazy-loaded when the route is visited.
  37. component: () => import(/* webpackChunkName: "docs" */ './views/Docs.vue')
  38. },
  39. {
  40. path: '/publications',
  41. name: 'publications',
  42. // route level code-splitting
  43. // this generates a separate chunk (about.[hash].js) for this route
  44. // which is lazy-loaded when the route is visited.
  45. component: () => import(/* webpackChunkName: "publications" */ './views/Publications.vue')
  46. },
  47. {
  48. path: '/report',
  49. name: 'bugreport',
  50. // route level code-splitting
  51. // this generates a separate chunk (about.[hash].js) for this route
  52. // which is lazy-loaded when the route is visited.
  53. component: () => import(/* webpackChunkName: "bugreport" */ './views/BugReport.vue')
  54. },
  55. {
  56. path: '/manual',
  57. name: 'manual',
  58. // route level code-splitting
  59. // this generates a separate chunk (about.[hash].js) for this route
  60. // which is lazy-loaded when the route is visited.
  61. component: () => import(/* webpackChunkName: "manual" */ './views/Manual.vue')
  62. },
  63. {
  64. path: '/404',
  65. name: 'notfound',
  66. component: () => import(/* webpackChunkName: "notfound" */ './views/NotFound.vue')
  67. },
  68. {
  69. path: '*',
  70. redirect: { name: 'notfound' }
  71. }
  72. ]
  73. })