From f1c552ff445ce2b4b274632abbca2665bb0a12e1 Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 7 Jun 2021 15:42:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(chart):=E8=A1=A8=E6=A0=BCchart=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/table/TableNormal.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/chart/components/table/TableNormal.vue b/frontend/src/views/chart/components/table/TableNormal.vue index 427dc50ad2..f1198f1e04 100644 --- a/frontend/src/views/chart/components/table/TableNormal.vue +++ b/frontend/src/views/chart/components/table/TableNormal.vue @@ -2,6 +2,7 @@

{{ chart.title }}

{ + this.initStyle() + }) window.onresize = function() { that.calcHeight() } @@ -165,15 +168,18 @@ export default { this.bg_class.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha) } } - // 修改footer合计样式 - const s_table = document.getElementsByClassName('elx-table--footer')[0] + const table = document.getElementById(this.chart.id) + const s_table = table.getElementsByClassName('elx-table--footer') // console.log(s_table) let s = '' for (const i in this.table_header_class) { s += (i === 'fontSize' ? 'font-size' : i) + ':' + this.table_header_class[i] + ';' } - s_table.setAttribute('style', s) + console.log(s_table) + for (let i = 0; i < s_table.length; i++) { + s_table[i].setAttribute('style', s) + } }, getRowStyle({ row, rowIndex }) { if (rowIndex % 2 === 0) {