mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
* 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>
53 lines
1.3 KiB
TypeScript
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,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
});
|