salix-front/src/router/routes.ts

52 lines
1.6 KiB
TypeScript
Raw Normal View History

2022-03-11 10:25:30 +00:00
import { RouteRecordRaw } from 'vue-router';
const routes: RouteRecordRaw[] = [
2022-03-11 10:41:23 +00:00
{
path: '/login',
name: 'Login',
2022-03-14 09:36:52 +00:00
meta: { title: 'logIn' },
2022-03-11 10:41:23 +00:00
component: () => import('../pages/Login/Login.vue'),
},
{
path: '/',
name: 'Main',
2022-03-11 11:59:10 +00:00
component: () => import('../layouts/Main.vue'),
2022-03-11 10:41:23 +00:00
redirect: { name: 'Dashboard' },
children: [
{
path: '/dashboard',
name: 'Dashboard',
2022-03-14 09:36:52 +00:00
meta: { title: 'dashboard' },
2022-03-11 10:41:23 +00:00
component: () => import('../pages/Dashboard/Dashboard.vue'),
},
{
path: '/customer',
name: 'Customer',
2022-03-14 09:36:52 +00:00
meta: { title: 'customers' },
2022-03-11 10:41:23 +00:00
component: () => import('../pages/Customer/Customer.vue'),
redirect: { name: 'List' },
children: [
{
path: 'list',
name: 'List',
2022-03-14 09:36:52 +00:00
meta: { title: 'list' },
2022-03-11 10:41:23 +00:00
component: () => import('../pages/Customer/List.vue'),
},
{
path: ':id',
name: 'Card',
component: () => import('../pages/Customer/Card/Card.vue'),
},
],
},
{
path: '/:pathMatch(.*)*',
name: 'NotFound',
2022-03-11 11:59:10 +00:00
component: () => import('../pages/NotFound.vue'),
2022-03-11 10:41:23 +00:00
},
],
},
2022-03-11 10:25:30 +00:00
];
export default routes;