refactor: go to Error404
This commit is contained in:
parent
471883e5e5
commit
6ab696fd60
1 changed files with 17 additions and 3 deletions
|
|
@ -29,19 +29,33 @@ const route: RouteRecordRaw[] = [
|
|||
if (itemExists) {
|
||||
next();
|
||||
} else {
|
||||
next({ name: "Error404NotFound" });
|
||||
next({
|
||||
name: "Error404NotFound",
|
||||
params: { pathMatch: to.path.substring(1).split("/") },
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/:name",
|
||||
name: "Pages",
|
||||
path: "/build-and-deploy",
|
||||
name: "BuildAndDeploy",
|
||||
component: () => import("@/modules/02_pages/MainPage.vue"),
|
||||
},
|
||||
{
|
||||
path: "/debug",
|
||||
name: "Debug",
|
||||
component: () => import("@/modules/02_pages/MainPage.vue"),
|
||||
},
|
||||
// {
|
||||
// path: "/:name",
|
||||
// name: "Pages",
|
||||
// component: () => import("@/modules/02_pages/MainPage.vue"),
|
||||
// },
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
name: "Error404NotFound",
|
||||
component: Error404NotFound,
|
||||
props: true,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue