From 1605bd66ab97a206e4698954d47b10d87b09ec2d Mon Sep 17 00:00:00 2001 From: Ntkskwk Date: Tue, 3 Sep 2024 00:03:19 +0800 Subject: feat: add router-guards for site --- site/src/router/index.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'site/src/router') 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({ -- cgit v1.2.3-70-g09d2