Add vue-router

Add home page
This commit is contained in:
2024-04-26 14:31:58 +01:00
parent a7854fbbe3
commit 4eec366672
4 changed files with 29 additions and 44 deletions

View File

@@ -1,5 +1,22 @@
import {createApp} from 'vue'
import { createApp } from 'vue'
import { createWebHashHistory, createRouter } from 'vue-router'
import App from './App.vue'
import './style.css';
createApp(App).mount('#app')
const routes = [
{
path: '/',
name: 'home',
component: () => import('./pages/Index.vue')
}
]
const router = createRouter({
history: createWebHashHistory(),
routes
})
createApp(App)
.use(router)
.mount('#app')