This commit is contained in:
2025-03-26 00:29:18 +08:00
parent 9579987fd9
commit a865439f39
21 changed files with 101 additions and 43 deletions
+21 -5
View File
@@ -1,9 +1,9 @@
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
const routes: RouteRecordRaw[] = [
{
path: '/:pathMatch(.*)',
redirect: '/',
},
// {
// path: '/:pathMatch(.*)',
// redirect: '/',
// },
{
path: '/',
name: 'home',
@@ -11,9 +11,25 @@ const routes: RouteRecordRaw[] = [
},
{
path:'/character/:alter',
name:'character',
redirect: (to) => {
return { path: `/character/equipment/${to.params.alter}` }
},
props: true,
name:'character',
component: defineAsyncComponent(() => import('@/pages/Character/Index.vue')),
children: [
{
path: '/character/equipment/:alter',
name: 'equipment',
props: true,
component: defineAsyncComponent(() => import('@/pages/Character/Equipment/Index.vue')),
},{
path: '/character/skill/:alter',
name: 'skill',
props: true,
component: defineAsyncComponent(() => import('@/pages/Character/Skill/index.vue')),
}
]
}
]