diff --git a/src/components/Graph.vue b/src/components/Graph.vue index 1fce3694..838717f5 100644 --- a/src/components/Graph.vue +++ b/src/components/Graph.vue @@ -74,6 +74,9 @@ onMounted(async () => { document.addEventListener( "click", () => { + if (instance.isDisposed()) { + return; + } instance.dispatchAction({ type: "hideTip", }); diff --git a/src/types/dashboard.d.ts b/src/types/dashboard.d.ts index 3b5e2923..4bb9aa33 100644 --- a/src/types/dashboard.d.ts +++ b/src/types/dashboard.d.ts @@ -38,7 +38,7 @@ export interface LayoutConfig { metricConfig?: MetricConfigOpt[]; id?: string; associate?: { widgetId: string }[]; - filters?: { value: number | string; dataIndex: number; sourceId: string }; + filters?: { dataIndex: number; sourceId: string }; } export type MetricConfigOpt = { diff --git a/src/views/dashboard/controls/Widget.vue b/src/views/dashboard/controls/Widget.vue index 232bb128..1598e87c 100644 --- a/src/views/dashboard/controls/Widget.vue +++ b/src/views/dashboard/controls/Widget.vue @@ -172,7 +172,6 @@ export default defineComponent({ ); if (widget) { widget.filters = { - value: params.value[0], dataIndex: params.dataIndex, sourceId: props.data.id || "", };