Lazy load some routes to improve initial render performance (#7930)

#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

#### What this PR does / why we need it:

Lazy load some routes to improve initial render performance

#### Does this PR introduce a user-facing change?

```release-note
懒加载 Console 和 UC 的部分路由,优化首屏渲染速度
```
This commit is contained in:
Ryan Wang
2025-11-13 14:28:46 +08:00
committed by GitHub
parent 3a177fe050
commit dab1ceb537
19 changed files with 78 additions and 54 deletions

View File

@@ -3,8 +3,6 @@ import { IconDashboard } from "@halo-dev/components";
import { definePlugin } from "@halo-dev/ui-shared";
import { markRaw } from "vue";
import WidgetCard from "./components/WidgetCard.vue";
import Dashboard from "./Dashboard.vue";
import DashboardDesigner from "./DashboardDesigner.vue";
export default definePlugin({
components: {
@@ -20,7 +18,7 @@ export default definePlugin({
{
path: "dashboard",
name: "Dashboard",
component: Dashboard,
component: () => import("./Dashboard.vue"),
meta: {
title: "core.dashboard.title",
searchable: true,
@@ -36,7 +34,7 @@ export default definePlugin({
{
path: "dashboard/designer",
name: "DashboardDesigner",
component: DashboardDesigner,
component: () => import("./DashboardDesigner.vue"),
meta: {
title: "core.dashboard_designer.title",
searchable: false,