Files
halo/ui/uc-src/modules/notifications/module.ts
Ryan Wang dab1ceb537 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 的部分路由,优化首屏渲染速度
```
2025-11-13 06:28:46 +00:00

34 lines
858 B
TypeScript

import { IconNotificationBadgeLine } from "@halo-dev/components";
import { definePlugin } from "@halo-dev/ui-shared";
import BasicLayout from "@uc/layouts/BasicLayout.vue";
import { markRaw } from "vue";
export default definePlugin({
ucRoutes: [
{
path: "/notifications",
name: "NotificationsRoot",
component: BasicLayout,
meta: {
title: "core.uc_notification.title",
searchable: true,
hideFooter: true,
menu: {
name: "core.uc_sidebar.menu.items.notification",
group: "dashboard",
icon: markRaw(IconNotificationBadgeLine),
priority: 1,
mobile: true,
},
},
children: [
{
path: "",
name: "Notifications",
component: () => import("./Notifications.vue"),
},
],
},
],
});