From ed085bcfe50f79d6746ff5348ec76e8ba3bea13b Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Tue, 9 Jun 2020 10:54:06 +0800 Subject: [PATCH] =?UTF-8?q?perf:project=20asset=20=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=BB=9F=E4=B8=80=E5=AE=9A=E6=97=B6=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/charts/line-chart-block.vue | 7 ++++++- .../common/bottomBox/tabs/panelTab.vue | 12 +++++++----- .../src/components/page/dashboard/panel.vue | 17 ++++++++++------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index b92b8b67b..28c4c0134 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -176,6 +176,7 @@ '#f58220', '#c37e00', '#00ae9d', '#f26522', '#76becc', '#76624c', '#d71345', '#2468a2', '#ca8687', '#1b315e', ], + stackTotalColor:null, firstShow: false, // 默认不显示操作按钮, caretShow:false, dropdownMenuShow:false, @@ -515,9 +516,13 @@ str += ``; }); if(self.data.type==='stackArea' || self.isStackArea){ + if(!self.stackTotalColor||self.stackTotalColor==''){ + self.stackTotalColor=randomcolor(); + } sum = parseFloat(Number(sum).toFixed(2)); str +=`
`; - str +=`
` + str +=`
` + str +=``; str +=self.$t("dashboard.panel.chartTotal"); str +=`
`; str +=`
`; diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue index dcb4fe810..9639028a3 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue @@ -22,7 +22,7 @@
-
+ +
-
+ +
-
+ -
+ +