From 661a6f8d4e79064d7a9330a38e38209f4f7e37a2 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Fri, 9 Jun 2023 14:23:19 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=A4=84=E7=90=86chartDiagram=20?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/chart/chart/chartDiagram.vue | 11 +++++++---- .../src/components/common/mixin/beforeMeta2d.js | 3 ++- .../common/rightBox/chart/otherChartConfig.vue | 4 +++- .../src/components/page/monitor/project/project.vue | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/nezha-fronted/src/components/chart/chart/chartDiagram.vue b/nezha-fronted/src/components/chart/chart/chartDiagram.vue index 73a79a595..c31a2e5f0 100644 --- a/nezha-fronted/src/components/chart/chart/chartDiagram.vue +++ b/nezha-fronted/src/components/chart/chart/chartDiagram.vue @@ -9,7 +9,7 @@ - + @@ -37,13 +37,16 @@ export default { } } }, + created () { + this.$get('/topology/icon').then(res => { + this.iconArray = [...res.data.list] + this.iconArrayLoad = true + }) + }, mounted () { bus.$on('showMeta2dPreview', (params) => { this.isPreview = params }) - this.$get('/topology/icon').then(res => { - this.iconArray = [...res.data.list] - }) this.reload() }, methods: { diff --git a/nezha-fronted/src/components/common/mixin/beforeMeta2d.js b/nezha-fronted/src/components/common/mixin/beforeMeta2d.js index 692c87f91..3f2e0069c 100644 --- a/nezha-fronted/src/components/common/mixin/beforeMeta2d.js +++ b/nezha-fronted/src/components/common/mixin/beforeMeta2d.js @@ -5,7 +5,8 @@ export default { querysArray: [], meta2dType: '', params: {}, - iconArray: [] + iconArray: [], + iconArrayLoad: false } }, watch: { diff --git a/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue index fb454d10e..1b9501606 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue @@ -142,7 +142,7 @@
- +
@@ -392,6 +392,7 @@ export default { querysArray: [], meta2dType: '', iconArray: [], + iconArrayLoad: false, isPreview: { show: false, topoData: {}, @@ -546,6 +547,7 @@ export default { this.init() this.$get('/topology/icon').then(res => { this.iconArray = [...res.data.list] + this.iconArrayLoad = true }) }, destroyed () { diff --git a/nezha-fronted/src/components/page/monitor/project/project.vue b/nezha-fronted/src/components/page/monitor/project/project.vue index 1d20d865f..06a0e05ca 100644 --- a/nezha-fronted/src/components/page/monitor/project/project.vue +++ b/nezha-fronted/src/components/page/monitor/project/project.vue @@ -1,7 +1,7 @@