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: 'Dashboard',
icon: 'screencast-2-linear',
BgColor: 'primary',
to: '/dashboard1'
},
{
title: 'Dashboard 2',
icon: 'chart-line-duotone',
BgColor: 'success',
to: '/dashboard2'
},
]
3. How to add page to horizontal sidebar ?
// ------------------------------------------------------------
// File: /src/layouts/full/horizontal-sidebar/horizontalItems.ts
// ------------------------------------------------------------
const horizontalItems: menu[] = [
{
title: 'Dashboard',
icon: 'screencast-2-linear',
BgColor: 'primary',
to: '#',
children: [
{
title: 'Dashboard',
to: '/dashboard1'
},
{
title: 'Dashboard 2',
to: '/dashboard2'
}
]
},
]