import Layout from '@/layout/index.vue'

// 公开路由表
export const publicRoutes = [
  {
    path: '/login',
    name: 'Login',
    title: '登录',
    component: () => import('@/views/login/index.vue')
  },
  {
    path: '/',
    redirect: '/home',
    name: 'Layout',
    component: Layout,
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          icon: 'el-icon-s-home'
        }
      },
      // 404
      {
        path: '/404',
        name: 'redirect',
        component: () => import('@/views/err-page/404.vue')
      },
      // 401
      {
        path: '/401',
        name: 'error',
        component: () => import('@/views/err-page/401.vue')
      }
    ]
  }
]
