diff options
| author | 2024-09-03 00:03:19 +0800 | |
|---|---|---|
| committer | 2024-09-03 00:03:19 +0800 | |
| commit | 1605bd66ab97a206e4698954d47b10d87b09ec2d (patch) | |
| tree | 8dd421ccbf3b1bb6b273e11644af9f830484a666 /site/src/router | |
| parent | e960ff10b9e9a0d8c9842d23aa278d524b7de124 (diff) | |
| download | HydroRoll-1605bd66ab97a206e4698954d47b10d87b09ec2d.tar.gz HydroRoll-1605bd66ab97a206e4698954d47b10d87b09ec2d.zip | |
feat: add router-guards for site
Diffstat (limited to 'site/src/router')
| -rw-r--r-- | site/src/router/index.ts | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/site/src/router/index.ts b/site/src/router/index.ts index 65353da..5b90a51 100644 --- a/site/src/router/index.ts +++ b/site/src/router/index.ts @@ -4,18 +4,13 @@ import { createRouter, createWebHistory } from 'vue-router' const routes = [ { path: '/', - component: () => import('@/layouts/default/Default.vue'), - children: [ - { - path: '', - name: 'Home', - // route level code-splitting - // this generates a separate chunk (about.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue'), - }, - ], + component: () => import('@/views/Welcome.vue'), }, + { + path: '/:path(.*)', + name: '404', + component: () => import('@/views/404.vue'), + } ] const router = createRouter({ |
