You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.1 KiB

  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. import TestView from '@/views/TestView.vue'
  4. import TextView from '@/views/TextView.vue'
  5. import ReportView from '@/views/ReportView.vue'
  6. import ProblemView from '@/views/ProblemView.vue'
  7. import ResultView from '@/views/ResultView.vue'
  8. // import { component } from 'vue/types/umd'
  9. import HomeView from '@/views/HomeView.vue'
  10. import BuyView from '@/views/BuyView.vue'
  11. Vue.use(VueRouter)
  12. const routes = [
  13. {
  14. path: '/',
  15. name: 'HomeView',
  16. component: HomeView
  17. },
  18. {
  19. path: '/test',
  20. name: 'TestView',
  21. component: TestView
  22. },
  23. {
  24. path: '/text',
  25. name: 'TextView',
  26. component: TextView
  27. },
  28. {
  29. path: '/result',
  30. name: 'ResultView',
  31. component: ResultView
  32. },
  33. {
  34. path: '/report',
  35. name: 'ReportView',
  36. component: ReportView
  37. },
  38. {
  39. path: '/buy',
  40. name: 'BuyView',
  41. component: BuyView
  42. },
  43. {
  44. path: '/problem',
  45. name: 'ProblemView',
  46. component: ProblemView
  47. }
  48. ]
  49. const router = new VueRouter({
  50. mode: 'history',
  51. base: process.env.BASE_URL,
  52. routes
  53. })
  54. export default router