1
0
forked from zguiy/utils
Files
utils/src/router/index.ts
2025-06-28 22:50:01 +08:00

26 lines
552 B
TypeScript

import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
const router = createRouter({
history: createWebHistory('/'),
routes: [
{
path: '/',
name: 'home',
component: HomeView
},
{
path: '/tools/:toolCode',
name: 'tool',
component: () => import('@/views/ToolView.vue'),
props: true
},
{
path: '/:pathMatch(.*)*',
name: 'not-found',
component: () => import('@/views/NotFoundView.vue')
}
]
})
export default router