diff --git a/src/components/echarts/pie.vue b/src/components/echarts/pie.vue index 9be51fd90566699fc6788b1ab62b1128dff6c151..5c73cf729cbe7ad07cce8e2251288df1df160f2d 100644 --- a/src/components/echarts/pie.vue +++ b/src/components/echarts/pie.vue @@ -83,7 +83,7 @@ const option = computed(() => ({ return template; } }, - data: props.data + data: props.data[0] !== null ? props.data : [] } ] })); diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 1cc9c4c95a7ab407a3171f2718dfbeeeb406bfff..645f8b34d1bc58bf42aef5b4c0a9a736ce4ed12c 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -127,7 +127,7 @@ const fetchData = () => { color: '#5470C6' } }, - ] : []; + ] : [null]; state.nodeData = [ { value: onlineNode || 0, diff --git a/src/views/monitor-center/cluster-status/index.vue b/src/views/monitor-center/cluster-status/index.vue index e30c238246088eec5e14edb803bf6eef9504b79c..0bcb015fc9af88feadd842be96354b29a38191ba 100644 --- a/src/views/monitor-center/cluster-status/index.vue +++ b/src/views/monitor-center/cluster-status/index.vue @@ -177,7 +177,7 @@ const getMonitorList = () => { color: '#5470C6' } }, - ] : []; + ] : [null]; }).catch(() => { state.osdData = []; state.monData = [];