21 lines
762 B
JavaScript
21 lines
762 B
JavaScript
import { createApp } from 'vue'
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
import './style.css'
|
|
import App from './App.vue'
|
|
import Cabinets from './components/Cabinets.vue'
|
|
import Computers from './components/Computers.vue'
|
|
import Monitors from './components/Monitors.vue'
|
|
|
|
const routes = [
|
|
{ path: '/', redirect: '/cabinets' },
|
|
{ path: '/cabinets', component: Cabinets, meta: { label: 'Кабинеты' } },
|
|
{ path: '/computers', component: Computers, meta: { label: 'Компьютеры' } },
|
|
{ path: '/monitors', component: Monitors, meta: { label: 'Мониторы' } }
|
|
]
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
linkActiveClass: 'active',
|
|
routes
|
|
})
|
|
createApp(App).use(router).mount('#app') |