import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router' const routes: RouteRecordRaw[] = [ // { // path: '/:pathMatch(.*)', // redirect: '/', // }, { path: '/', name: 'home', component: () => import('@/pages/Home/Index.vue'), }, { path: '/dnfhelper', name: 'dnfhelper', component: () => import('@/pages/Dnfhelper/index.vue'), }, { path: '/ui-preview', name: 'ui-preview', component: () => import('@/pages/UiPreview/Index.vue'), }, { path: '/components', name: 'component-catalog', meta: { disableAppZoom: true }, component: () => import('@/pages/ComponentCatalog/Index.vue'), }, { path: '/character/:alter', meta: { disableAppZoom: true }, redirect: (to) => { return { path: `/character/equipment/${to.params.alter}`, query: to.query } }, props: true, name: 'character', component: () => import('@/pages/Character/Index.vue'), children: [ { path: '/character/equipment/:alter', name: 'equipment', props: true, component: () => import('@/pages/Character/EquipmentDictionary/Index.vue'), }, { path: '/character/skill/:alter', name: 'skill', props: true, component: () => import('@/pages/Character/Skill/index.vue'), }, { path: '/character/forge/:alter', name: 'forge', props: true, component: () => import('@/pages/Character/Forge/index.vue'), }, ], }, ] const router = createRouter({ // routes, routes, history: createWebHistory(import.meta.env.BASE_URL), }) export default router