feat: init

This commit is contained in:
yanghao05
2025-04-16 21:07:57 +08:00
parent 85301c8994
commit 85ece3e899
7 changed files with 31 additions and 70 deletions

View File

@@ -0,0 +1,36 @@
import { createRouter, createWebHistory } from 'vue-router'
const routes = [
{
path: '/',
component: () => import('@/layouts/MainLayout.vue'),
children: [
{
path: '',
name: 'home',
component: () => import('@/views/ArticleList.vue'),
meta: { keepAlive: true }
},
{
path: 'purchased',
name: 'purchased',
component: () => import('@/views/PurchasedArticles.vue')
},
{
path: 'profile',
name: 'profile',
component: () => import('@/views/UserProfile.vue')
}
]
},
{
path: '/article/:id',
name: 'article-detail',
component: () => import('@/views/ArticleDetail.vue')
}
]
export const router = createRouter({
history: createWebHistory(),
routes
})