index.ts 458 B

12345678910111213141516171819
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. const router = createRouter({
  3. history: createWebHistory(import.meta.env.BASE_URL),
  4. routes: [
  5. {
  6. path: '/',
  7. component: () => import('@/layout/Home.vue'),
  8. children: [
  9. {
  10. path: '/',
  11. name: 'index',
  12. meta: { title: '系统首页' },
  13. component: () => import('@/views/index.vue')
  14. },
  15. ]
  16. }
  17. ]
  18. })
  19. export default router