From 0c790f981b86f94d8840210f0931c84b7bf5e841 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Thu, 17 Sep 2020 11:49:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8DsingleStat=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98&?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=BE=E8=A1=A8=E7=B1=BB=E5=9E=8B=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/page/dashboard/chartBox.vue | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/nezha-fronted/src/components/page/dashboard/chartBox.vue b/nezha-fronted/src/components/page/dashboard/chartBox.vue index 57dfcca81..d417f4962 100644 --- a/nezha-fronted/src/components/page/dashboard/chartBox.vue +++ b/nezha-fronted/src/components/page/dashboard/chartBox.vue @@ -323,30 +323,30 @@ id:"line", name:this.$t("dashboard.panel.chartForm.typeVal.line.label") }, - { - id:"bar", - name:this.$t("dashboard.panel.chartForm.typeVal.bar.label") - }, - { - id:"table", - name:this.$t("dashboard.panel.chartForm.typeVal.table.label") - }, { id:'stackArea', name:this.$t("dashboard.panel.chartForm.typeVal.stackArea.label") }, { - id:'url', - name:this.$t("dashboard.panel.chartForm.typeVal.url.label") + id:"bar", + name:this.$t("dashboard.panel.chartForm.typeVal.bar.label") }, { id:'singleStat', name:this.$t("dashboard.panel.chartForm.typeVal.singleStat.label") }, + { + id:"table", + name:this.$t("dashboard.panel.chartForm.typeVal.table.label") + }, { id:'alertList', name:this.$t("dashboard.panel.chartForm.typeVal.alertList.label") - } + }, + { + id:'url', + name:this.$t("dashboard.panel.chartForm.typeVal.url.label") + }, ], elements: [1], // 指标部分 tarNum elementTarget: [], // 本地保存数据 @@ -1225,6 +1225,7 @@ } else if(n.type === 'alertList'){ this.setIsAlertList(); } else if(n.type === 'singleStat'){ + n.param&&!n.param.valueMapping&&this.$set(this.editChart.param,'valueMapping',{type:'value',mapping:[{text:'',value:''}]}) this.setIsSingleStat(); } else { this.setIsOtherChart();