21 lines
520 B
TypeScript
21 lines
520 B
TypeScript
|
|
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
|
||
|
|
import MainLayout from '@/layouts/MainLayout.vue'
|
||
|
|
|
||
|
|
const routes: RouteRecordRaw[] = [
|
||
|
|
{
|
||
|
|
path: '/',
|
||
|
|
component: MainLayout,
|
||
|
|
children: [
|
||
|
|
{ path: '', name: 'home', component: () => import('@/pages/HomePage.vue') },
|
||
|
|
{ path: 'profile', name: 'profile', component: () => import('@/pages/ProfilePage.vue') },
|
||
|
|
],
|
||
|
|
},
|
||
|
|
]
|
||
|
|
|
||
|
|
const router = createRouter({
|
||
|
|
history: createWebHistory(),
|
||
|
|
routes,
|
||
|
|
})
|
||
|
|
|
||
|
|
export default router
|