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: 'eCommerce',
icon: 'widget-add-line-duotone',
to: '/dashboards/ecommerce'
},
{
title: 'Analytics',
icon: 'chart-line-duotone',
to: '/dashboards/analytics'
},
{
title: 'CRM',
icon: 'layers-line-duotone',
to: '/dashboards/crm'
},
}
]
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: 'eCommerce',
icon: CircleIcon,
to: '/dashboards/ecommerce'
},
{
title: 'Analytics',
icon: CircleIcon,
to: '/dashboards/analytics'
},
{
title: 'CRM',
icon: CircleIcon,
to: '/dashboards/crm'
}
]
},
]