mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-05-03 14:31:29 +08:00
25 lines
603 B
JavaScript
25 lines
603 B
JavaScript
import { createRouter, createWebHistory } from 'vue-router'
|
|
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: 'layout',
|
|
component: Layout,
|
|
redirect: '/index' ,
|
|
children :[
|
|
{
|
|
name:'index',
|
|
path: '/index',
|
|
component: () => import('../views/Index.vue')
|
|
},
|
|
]
|
|
},
|
|
{ path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound },
|
|
]
|
|
})
|
|
|
|
export default router
|