mirror of
https://github.com/kevin-DL/wails-vue-template.git
synced 2026-01-17 12:14:54 +00:00
Add vue-router
Add home page
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user