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: 'dashboards',
id: 1,
children: [
{
title: 'Dashboard1',
icon: 'widget-add-line-duotone',
to: '/dashboards/dashboard1'
},
{
title: 'Dashboard2',
icon: 'chart-line-duotone',
to: '/dashboards/dashboard2'
},
{
title: 'Dashboard3',
icon: 'screencast-2-line-duotone',
to: '/dashboards/dashboard3'
},
]
}
]
3. How to add page to horizontal sidebar ?
// ------------------------------------------------------------
// File: /src/layouts/full/horizontal-sidebar/horizontalItems.ts
// ------------------------------------------------------------
const horizontalItems: menu[] = [
{
title: 'Dashboard',
icon: 'layers-line-duotone',
to: '#',
children: [
{
title: 'Dashboard 1',
icon: CircleIcon,
to: '/dashboards/dashboard1'
},
{
title: 'Dashboard 2',
icon: CircleIcon,
to: '/dashboards/dashboard2'
},
{
title: 'Dashboard 3',
icon: CircleIcon,
to: '/dashboards/dashboard3'
}
]
},
]