feat: 添加bbs前端搭建

This commit is contained in:
橙子
2023-03-03 21:58:58 +08:00
parent e0da9e1a87
commit 61f8a07753
17 changed files with 100 additions and 319 deletions

View File

@@ -1,22 +1,23 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Layout from '../layout/Index.vue'
import NotFound from '../views/NotFound.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: HomeView
name: 'layout',
component: Layout,
redirect: '/index' ,
children :[
{
name:'index',
path: '/index',
component: () => import('../views/Index.vue')
},
]
},
{
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('../views/AboutView.vue')
}
{ path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound },
]
})