Routing
1. How to add a new route ?
// ----------------------------------------------------
// File: src/router/MainRoutes.ts
// ----------------------------------------------------
const MainRoutes = {
path: '/main',
meta: {
requiresAuth: true
},
redirect: '/main',
component: () => import('@/layouts/full/FullLayout.vue'),
children: [
{
name: 'Dashboard1',
path: '/dashboards/dashboard1',
component: () => import('@/views/dashboard/dashboard1/index.vue')
},
]
}
2. How to add page to vertical sidebar ?
// ------------------------------------------------------------
// File: /src/layouts/full/vertical-sidebar/sidebarItem.ts
// ------------------------------------------------------------
const sidebarItem: menu[] = [
{ header: 'Home' },
{
title: 'Modern',
icon: ApertureIcon,
chip: 'New',
chipColor: 'surface',
chipBgColor: 'secondary',
to: '/dashboards/modern'
},
{
title: 'eCommerce',
icon: ShoppingCartIcon,
to: '/dashboards/ecommerce'
},
]
3. How to add page to horizontal sidebar ?
// ------------------------------------------------------------
// File: /src/layouts/full/horizontal-sidebar/horizontalItems.ts
// ------------------------------------------------------------
const horizontalItems: menu[] = [
{
title: 'Dashboard',
icon: HomeIcon,
to: '#',
children: [
{
title: 'Modern',
icon: CircleIcon,
to: '/dashboards/modern'
},
{
title: 'Ecommerce',
icon: CircleIcon,
to: '/dashboards/ecommerce'
}
]
},
]