From 32232e6f47956561a6627eb7a9e03a307afecc66 Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Tue, 4 Jan 2022 23:10:26 +0800 Subject: [PATCH] fix: update types --- src/types/dashboard.ts | 2 -- src/views/dashboard/graphs/Bar.vue | 3 ++- src/views/dashboard/graphs/HeatMap.vue | 3 ++- src/views/dashboard/graphs/Line.vue | 3 ++- src/views/dashboard/graphs/Pie.vue | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/types/dashboard.ts b/src/types/dashboard.ts index 186a9077..9364c2a2 100644 --- a/src/types/dashboard.ts +++ b/src/types/dashboard.ts @@ -1,5 +1,3 @@ -import { string } from "vue-types"; - /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/src/views/dashboard/graphs/Bar.vue b/src/views/dashboard/graphs/Bar.vue index d69dda43..55897065 100644 --- a/src/views/dashboard/graphs/Bar.vue +++ b/src/views/dashboard/graphs/Bar.vue @@ -29,7 +29,8 @@ const props = defineProps({ theme: { type: String, default: "dark" }, itemEvents: { type: Array as PropType, default: () => [] }, }); -const chart = ref(null); +/*global Nullable */ +const chart = ref>(null); const option = computed(() => getOption()); function getOption() { diff --git a/src/views/dashboard/graphs/HeatMap.vue b/src/views/dashboard/graphs/HeatMap.vue index 1442a818..0bf4f7a1 100644 --- a/src/views/dashboard/graphs/HeatMap.vue +++ b/src/views/dashboard/graphs/HeatMap.vue @@ -33,7 +33,8 @@ const props = defineProps({ default: () => ({}), }, }); -const chart = ref(null); +/*global Nullable */ +const chart = ref>(null); const option = computed(() => getOption()); function getOption() { const source = (props.data.nodes || []).map((d: number[]) => d[2]); diff --git a/src/views/dashboard/graphs/Line.vue b/src/views/dashboard/graphs/Line.vue index 92b1cc95..f456a96a 100644 --- a/src/views/dashboard/graphs/Line.vue +++ b/src/views/dashboard/graphs/Line.vue @@ -30,7 +30,8 @@ const props = defineProps({ theme: { type: String, default: "dark" }, itemEvents: { type: Array as PropType, default: () => [] }, }); -const chart = ref(null); +/*global Nullable */ +const chart = ref>(null); const option = computed(() => getOption()); // function resize() { // chart.value.myChart.resize(); diff --git a/src/views/dashboard/graphs/Pie.vue b/src/views/dashboard/graphs/Pie.vue index 9beff754..0524e6af 100644 --- a/src/views/dashboard/graphs/Pie.vue +++ b/src/views/dashboard/graphs/Pie.vue @@ -26,7 +26,8 @@ const props = defineProps({ }, theme: { type: String, default: "dark" }, }); -const chart = ref(null); +/*global Nullable */ +const chart = ref>(null); const option = computed(() => getOption()); function getOption() { return {