Routing
1. How to setup route?
(Set the path in src/router/MainRoutes.ts.)
// ----------------------------------------------------
// File: src/router/MainRoutes.ts
// ----------------------------------------------------
const MainRoutes = {
path: '/',
component: () => import('@/layouts/full/FullLayout.vue'),
children: [
{
name: 'Modern',
path: '/',
component: () => import('@/views/dashboards/Modern.vue')
},
{
name: 'eCommerce',
path: '/dashboards/eCommerce',
component: () => import('@/views/dashboards/Ecommerce.vue')
},
{
name: 'General',
path: '/dashboards/general',
component: () => import('@/views/dashboards/General.vue')
},
/* ***import rest of your Pages*** */
]
}
2. How to add page to vertical sidebar?
// ------------------------------------------------------------------------
// File: /src/layouts/full/vertical-sidebar/sidebarItem.ts
// ------------------------------------------------------------------------
const sidebarItem: menu[] = [
{ header: 'DASHBOARD' },
{
title: 'Modern',
icon: 'home-smile-linear',
to: '/'
},
{
title: 'eCommerce',
icon: 'bag-5-linear',
to: '/dashboards/ecommerce'
},
{
title: 'General',
icon: 'help-line-duotone',
to: '/dashboards/general'
},
]
3. How to add page to horizontal sidebar ?
// ------------------------------------------------------------------------
// File: /src/layouts/full/horizontal-sidebar/horizontalItems.ts
// ------------------------------------------------------------------------
const horizontalItems: menu[] = [
{
title: 'Dashboard',
icon: 'solar:home-smile-outline',
to: '#',
children: [
{
title: 'Modern',
icon:'solar:home-smile-linear',
to: '/'
},
{
title: 'eCommerce',
icon: "solar:bag-5-linear",
to: '/dashboards/ecommerce'
},
{
title: 'General',
icon: 'solar:chart-linear',
to: '/dashboards/general'
}
]
},
]