import {createRouter,createWebHistory,createWebHashHistory} from 'vue-router'

import Home from '@/components/home.vue'
import anquan from '@/pages/anquan.vue'
import gengduo from '@/pages/gengduo.vue'
import detail from '@/components/detail.vue'

const router = createRouter({
    history:createWebHistory(), //路由器的工作模式（稍后讲解）
    routes:[ //一个一个的路由规则
      {
        name:'home',
        path:'/',
        component:Home,

      },
      {
        name:'algorithm',
        path:'/algorithm:need',
        component:anquan,
      },
      {
        name:'detail',
        path:'/detail:algorithm_name',
        component:detail
      }
    ]
  })

  export default router