From 46136ab3a85b96b2f3f2d64fff1e5a9a8a64f65e Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Wed, 30 Mar 2022 15:52:32 +0800 Subject: [PATCH] fix toplist --- src/views/dashboard/graphs/TopList.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/dashboard/graphs/TopList.vue b/src/views/dashboard/graphs/TopList.vue index 1efebfc0..f86ef2cf 100644 --- a/src/views/dashboard/graphs/TopList.vue +++ b/src/views/dashboard/graphs/TopList.vue @@ -35,7 +35,7 @@ limitations under the License. --> @@ -61,9 +61,13 @@ const props = defineProps({ }, intervalTime: { type: Array as PropType, default: () => [] }, }); +console.log(props.config.color); const key = computed(() => Object.keys(props.data)[0] || ""); const available = computed( - () => Array.isArray(props.data[key.value]) && props.data[key.value][0].value + () => + Array.isArray(props.data[key.value]) && + props.data[key.value][0] && + props.data[key.value][0].value ); const maxValue = computed(() => { if (!(props.data[key.value] && props.data[key.value].length)) {