From 9daf49819266ec14a7c34d4dd1ee1c1cbc3d9720 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 10 Jun 2021 12:36:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=E8=A1=A8=E6=A0=BC=E6=96=91?= =?UTF-8?q?=E9=A9=AC=E7=BA=B9=E8=B7=9F=E9=9A=8F=E8=A7=86=E5=9B=BE=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/table/TableNormal.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/chart/components/table/TableNormal.vue b/frontend/src/views/chart/components/table/TableNormal.vue index b176dda447..75cdfb6d07 100644 --- a/frontend/src/views/chart/components/table/TableNormal.vue +++ b/frontend/src/views/chart/components/table/TableNormal.vue @@ -152,7 +152,13 @@ export default { } this.table_item_class_stripe = JSON.parse(JSON.stringify(this.table_item_class)) if (customAttr.color.tableStripe) { - this.table_item_class_stripe.background = hexColorToRGBA(customAttr.color.tableItemBgColor, customAttr.color.alpha - 40) + // this.table_item_class_stripe.background = hexColorToRGBA(customAttr.color.tableItemBgColor, customAttr.color.alpha - 40) + if (this.chart.customStyle) { + const customStyle = JSON.parse(this.chart.customStyle) + if (customStyle.background) { + this.table_item_class_stripe.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha) + } + } } } if (this.chart.customStyle) { @@ -184,7 +190,7 @@ export default { } }, getRowStyle({ row, rowIndex }) { - if (rowIndex % 2 === 0) { + if (rowIndex % 2 !== 0) { return this.table_item_class_stripe } else { return this.table_item_class