diff --git a/src/hooks/useDashboardsSession.ts b/src/hooks/useDashboardsSession.ts index f3e26bf3..3fc9d1af 100644 --- a/src/hooks/useDashboardsSession.ts +++ b/src/hooks/useDashboardsSession.ts @@ -16,7 +16,7 @@ */ import { ElMessage } from "element-plus"; import { useDashboardStore } from "@/store/modules/dashboard"; -import type { LayoutConfig, DashboardItem } from "@/types/dashboard"; +import type { LayoutConfig } from "@/types/dashboard"; import { ConfigFieldTypes } from "@/views/dashboard/data"; export default function getDashboard(param?: { name?: string; layer: string; entity: string }, t?: string) { @@ -24,7 +24,7 @@ export default function getDashboard(param?: { name?: string; layer: string; ent const dashboardStore = useDashboardStore(); const opt = param || dashboardStore.currentDashboard; const list = JSON.parse(sessionStorage.getItem("dashboards") || "[]"); - let dashboard: Nullable; + let dashboard: Recordable; if (type === ConfigFieldTypes.NAME) { dashboard = list.find( (d: { name: string; layer: string; entity: string }) =>