mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
#### What type of PR is this? /area ui /kind improvement /milestone 2.22.x #### What this PR does / why we need it: Lazy load partial routes to optimize initial load speed #### Does this PR introduce a user-facing change? ```release-note None ```
30 lines
613 B
TypeScript
30 lines
613 B
TypeScript
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
|
import type { RouteRecordRaw } from "vue-router";
|
|
|
|
export const routes: Array<RouteRecordRaw> = [
|
|
{
|
|
path: "/:pathMatch(.*)*",
|
|
component: BasicLayout,
|
|
children: [
|
|
{
|
|
path: "",
|
|
name: "NotFound",
|
|
component: () => import("@/views/exceptions/NotFound.vue"),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: "/403",
|
|
component: BasicLayout,
|
|
children: [
|
|
{
|
|
path: "",
|
|
name: "Forbidden",
|
|
component: () => import("@/views/exceptions/Forbidden.vue"),
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
export default routes;
|