Files
halo/ui/console-src/modules/dashboard/module.ts
Ryan Wang ede40ad698 Enhance type hints for globally registered components (#7933)
* Enhance type hints for globally registered components

* Refactor Codemirror props and language support

* Update

Signed-off-by: Ryan Wang <i@ryanc.cc>

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-11-14 14:51:55 +08:00

53 lines
1.3 KiB
TypeScript

import BasicLayout from "@console/layouts/BasicLayout.vue";
import { IconDashboard } from "@halo-dev/components";
import { definePlugin } from "@halo-dev/ui-shared";
import { markRaw } from "vue";
import WidgetCard from "./components/WidgetCard.vue";
declare module "vue" {
interface GlobalComponents {
WidgetCard: (typeof import("./components/WidgetCard.vue"))["default"];
}
}
export default definePlugin({
components: {
WidgetCard,
},
routes: [
{
path: "/",
component: BasicLayout,
name: "Root",
redirect: "/dashboard",
children: [
{
path: "dashboard",
name: "Dashboard",
component: () => import("./Dashboard.vue"),
meta: {
title: "core.dashboard.title",
searchable: true,
menu: {
name: "core.sidebar.menu.items.dashboard",
group: "dashboard",
icon: markRaw(IconDashboard),
priority: 0,
mobile: true,
},
},
},
{
path: "dashboard/designer",
name: "DashboardDesigner",
component: () => import("./DashboardDesigner.vue"),
meta: {
title: "core.dashboard_designer.title",
searchable: false,
},
},
],
},
],
});