Newer
Older
robot_dog_patrol_front / src / router / modules / menus.ts
// 所有菜单路由
import systemRoutes from './system'
import patrolRoutes from './patrol'
import type { Route } from '@/global'
const Layout = () => import('@/layouts/index.vue')

const routes: Route.recordRaw[] = [
  // 页面路由
  {
    path: '/home',
    component: Layout,
    redirect: '/patrol/navigation',
    name: 'Home',
    meta: {
      title: '首页',
      icon: 'ep:key',
      auth: '/dashboard',
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/home/dashboard/index.vue'),
        name: 'HomeIndex',
        meta: {
          title: '首页',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/home',
          auth: '/dashboard',
        },
      },
    ],
  },
  // 巡检管理
  ...patrolRoutes,
  // 系统路由
  ...systemRoutes,
]

export default routes