Files
tunji2/src/router/index.js
2026-06-01 17:28:00 +08:00

58 lines
1.3 KiB
JavaScript

import { createRouter, createWebHashHistory } from 'vue-router'
const routes = [
{
path: '/',
component: () => import('@/layouts/MainLayout.vue'),
children: [
{
path: '',
name: 'welcome',
component: () => import('@/views/WelcomeView.vue'),
},
{
path: 'notes',
name: 'notes',
component: () => import('@/views/NotesListView.vue'),
},
{
path: 'tags',
name: 'tags',
component: () => import('@/views/TagsView.vue'),
},
{
path: 'tags/:tagId',
name: 'tag-detail',
component: () => import('@/views/TagsView.vue'),
},
{
path: 'note/:id',
name: 'note-detail',
component: () => import('@/views/NoteDetailView.vue'),
},
{
path: 'search',
name: 'search',
component: () => import('@/views/SearchView.vue'),
},
{
path: 'settings',
name: 'settings',
component: () => import('@/views/SettingsView.vue'),
},
{
path: 'trash',
name: 'trash',
component: () => import('@/views/TrashView.vue'),
},
],
},
]
const router = createRouter({
history: createWebHashHistory(),
routes,
})
export default router