// Composables import { createRouter, createWebHistory } from 'vue-router' const routes = [ { path: '/', component: () => import('@/layouts/default/DefaultPortal.vue'), children: [ { path: '/', name: 'HomePage', component: () => import('@/views/HomePage.vue'), meta:{ title:"Портал МиФНС по ЦОД №2" } }, { path: '/structure', name: 'StructurePage', component: () => import('@/views/StructurePage.vue'), meta:{ title:"Структура" } }, { path: '/providing', name: 'ProvidingActivitiesPage', component: () => import('@/views/ProvidingActivitiesPage.vue'), meta:{ title:"Обеспечивающая деятельность" } }, { path: '/faq', name: 'FAQPage', component: () => import('@/views/FAQPage.vue'), meta:{ title:"Часто задаваемые вопросы" } }, { path: '/feedback', name: 'FeedbackPage', component: () => import('@/views/FeedbackPage.vue'), meta:{ title:"Обратная связь" } }, { path: '/labor', name: 'LaborProtection', component: () => import('@/views/LaborProtection.vue'), meta:{ title:"Безопасность" } }, { path: '/securyty', name: 'SecurityPage', component: () => import('@/views/SecurityPage.vue'), meta:{ title:"Охрана труда" } }, { path: '/inspection', name: 'AboutInspectionPage', component: () => import('@/views/AboutInspectionPage.vue'), meta:{ title:"Об инспекции" } }, { path: '/portal', name: 'AboutPortalPage', component: () => import('@/views/AboutPortalPage.vue'), meta:{ title:"О портале" } }, { path: '/news', name: 'AboutNewsPage', component: () => import('@/views/NewsPage.vue'), meta:{ title:"Лента новостей" } }, ], }, ] const router = createRouter({ history: createWebHistory(process.env.BASE_URL), routes, }) router.beforeEach((to,from, next)=>{ document.title = to.meta.title; next() }) export default router