kickoff
This commit is contained in:
@ -1,20 +1,39 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
import Index from '@/views/Index.vue'
|
||||
import Search from '@/views/Search.vue'
|
||||
import Edit from '@/views/profile/Edit.vue'
|
||||
import View from '@/views/profile/View.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: Home
|
||||
path: '/s',
|
||||
name: 's',
|
||||
component: {
|
||||
template: "<router-view/>"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'search',
|
||||
name: 'Search',
|
||||
component: Search
|
||||
},
|
||||
{
|
||||
path: '/profile/:member',
|
||||
name: 'ProfileMember',
|
||||
component: View
|
||||
},
|
||||
{
|
||||
path: '/profile-edit',
|
||||
name: 'ProfileEdit',
|
||||
component: Edit
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
|
||||
}
|
||||
path: '/',
|
||||
name: 'Index',
|
||||
component: Index
|
||||
},
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
|
Reference in New Issue
Block a user