import Vue from 'vue' import VueRouter from 'vue-router' import TestView from '@/views/TestView.vue' import TextView from '@/views/TextView.vue' import ReportView from '@/views/ReportView.vue' import ProblemView from '@/views/ProblemView.vue' import ResultView from '@/views/ResultView.vue' // import { component } from 'vue/types/umd' import HomeView from '@/views/HomeView.vue' import BuyView from '@/views/BuyView.vue' Vue.use(VueRouter) const routes = [ { path: '/', name: 'HomeView', component: HomeView }, { path: '/test', name: 'TestView', component: TestView }, { path: '/text', name: 'TextView', component: TextView }, { path: '/result', name: 'ResultView', component: ResultView }, { path: '/report', name: 'ReportView', component: ReportView }, { path: '/buy', name: 'BuyView', component: BuyView }, { path: '/problem', name: 'ProblemView', component: ProblemView } ] const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes }) export default router