Files
Yi.Admin/Yi.BBS.Vue3/src/router/index.js

25 lines
603 B
JavaScript
Raw Normal View History

2023-02-26 13:17:19 +08:00
import { createRouter, createWebHistory } from 'vue-router'
2023-03-03 21:58:58 +08:00
import Layout from '../layout/Index.vue'
import NotFound from '../views/NotFound.vue'
2023-02-26 13:17:19 +08:00
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
2023-03-03 21:58:58 +08:00
name: 'layout',
component: Layout,
redirect: '/index' ,
children :[
{
name:'index',
path: '/index',
component: () => import('../views/Index.vue')
},
]
2023-02-26 13:17:19 +08:00
},
2023-03-03 21:58:58 +08:00
{ path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound },
2023-02-26 13:17:19 +08:00
]
})
export default router