import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export const constantRoutes=[
  {
    path:"/login",
    component:()=>import("@/views/login"),
    name:"登录",
  },
  {
    path:"/home",
    component:()=>import("@/views/home"),
    name:"主页面"
  },
  {
    path:"/register",
    component:()=>import("@/views/register"),
    name:"注册",
  },
  {
    path:"/",
    redirect:"/login",
  },
  {
    path:"/dataset",
    component:()=>import("@/views/dataset"),
    name:"数据集",
  }

]
const createRouter = () => new Router({
  routes: constantRoutes
})

const router = createRouter()

export default router