From c57f04589a34224e37da0ab21313c583507c7ec9 Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Fri, 9 Dec 2022 10:24:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A3=80=E6=B5=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=20=E6=95=B0=E6=8D=AE=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts2/charts/npm/NpmEventsHeader.vue | 3 +++ src/views/detections/DetectionFilter.vue | 2 +- src/views/detections/DetectionList.vue | 2 +- src/views/detections/Index.vue | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/views/charts2/charts/npm/NpmEventsHeader.vue b/src/views/charts2/charts/npm/NpmEventsHeader.vue index 287cd69a..d5bf7b57 100644 --- a/src/views/charts2/charts/npm/NpmEventsHeader.vue +++ b/src/views/charts2/charts/npm/NpmEventsHeader.vue @@ -73,6 +73,9 @@ export default { get(api.npm.events.list, params).then(res => { if (res.code === 200) { this.showError = false + if (res.data.result.length === 0) { + this.chartData.forEach(d => { d.count = '-' }) + } res.data.result.forEach(t => { this.chartData.forEach(d => { if (d.eventSeverity === t.eventSeverity) { diff --git a/src/views/detections/DetectionFilter.vue b/src/views/detections/DetectionFilter.vue index b986f2bc..fe42a2bf 100644 --- a/src/views/detections/DetectionFilter.vue +++ b/src/views/detections/DetectionFilter.vue @@ -1,6 +1,6 @@