添加 404 页面及自动跳转功能,优化用户体验

This commit is contained in:
2025-03-08 19:19:17 +08:00
parent dbec283a7f
commit 706788161e
3 changed files with 124 additions and 0 deletions

View File

@ -19,6 +19,16 @@ const routes = [
component: () => import("@/views/ToolsView.vue"),
meta: { title: "工具" },
},
{
path: "/404",
name: "404",
component: () => import("@/views/404.vue"),
meta: { title: "寄了" },
},
{
path: "/:pathMatch(.*)*",
redirect: "/404",
},
];
const router = createRouter({