import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    name: "/",
    redirect: "/login",
    path: "/",
  },
  {
    path: "/login",
    component: () => import("../pages/login/login.vue"),
  },
  {
    path: "/home",
    component: () => import("../pages/home/home.vue"),
    children: [
      {
        path: "/echarts",
        name: "echarts",
        component: () => import("../pages/home/echarts.vue"),
      },
      {
        path: "/video",
        name: "video",
        component: () => import("../pages/home/video.vue"),
      },
      {
        path: "/other",
        name: "other",
        component: () => import("../pages/home/other.vue"),
      },
    ],
  },
];
const router = createRouter({
  history: createWebHistory(),
  routes,
});
export default router;
