import { createRouter, createWebHistory } from 'vue-router' 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: '/s', name: 's', component: { template: "" }, children: [ { path: 'search', name: 'Search', component: Search }, { path: '/profile/:member', name: 'ProfileMember', component: View }, { path: '/profile-edit', name: 'ProfileEdit', component: Edit }, ] }, { path: '/', name: 'Index', component: Index }, ] const router = createRouter({ history: createWebHistory(process.env.BASE_URL), routes }) export default router