From c00c2b49c9014e28ffaa7b41edd466c2a79e394b Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Wed, 20 Dec 2023 14:10:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE-=E8=A1=A8=E6=A0=BC):=20?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E8=A1=A8=E5=A4=B4=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/views/chart/chart/table/table-info.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/frontend/src/views/chart/chart/table/table-info.js b/core/frontend/src/views/chart/chart/table/table-info.js index 6eb79e7502..61013bfbbd 100644 --- a/core/frontend/src/views/chart/chart/table/table-info.js +++ b/core/frontend/src/views/chart/chart/table/table-info.js @@ -98,10 +98,9 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo) if (s2Options.showSeriesNumber) { s2Options.colCell = (node) => { if (node.colIndex === 0) { - if (!customAttr.size.indexLabel) { + node.label = customAttr.size.indexLabel + if (!customAttr.size.indexLabel || customAttr.size.showTableHeader === false) { node.label = ' ' - } else { - node.label = customAttr.size.indexLabel } } } @@ -120,6 +119,11 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo) colCellVertical: false } } + s2Options.colCell = (node) => { + if (node.colIndex === 0) { + node.label = ' ' + } + } } // 开始渲染