From 8bbbfc8970c5f4797ee521e113c64e71d692535c Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Tue, 6 Sep 2022 11:48:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85npm=E8=AF=84=E5=88=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8nodata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts2/charts/npm/NpmAppCategoryScore.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/charts2/charts/npm/NpmAppCategoryScore.vue b/src/views/charts2/charts/npm/NpmAppCategoryScore.vue index 049e2349..0d935735 100644 --- a/src/views/charts2/charts/npm/NpmAppCategoryScore.vue +++ b/src/views/charts2/charts/npm/NpmAppCategoryScore.vue @@ -95,6 +95,11 @@ + @@ -130,7 +135,8 @@ export default { { label: 'network.total', prop: 'total' }, { label: 'network.outbound', prop: 'outbound' }, { label: 'network.inbound', prop: 'inbound' } - ] + ], + isNoData: false } }, mixins: [chartMixin], @@ -155,6 +161,7 @@ export default { const prevData = res[1].data.result const data = res[0].data.result if (data && data.length > 0) { + this.isNoData = false const tableData = data.map(d => { const mapping = npmCategoryInfoMapping.find(mapping => mapping.appSubcategory === d.appSubcategory) const result = { @@ -207,6 +214,7 @@ export default { }) } else { this.tableData = [] + this.isNoData = true } }).finally(() => { this.toggleLoading(false)