From b8b9f37000c0dd18c3cc87cd6a644ec9c446ad5a Mon Sep 17 00:00:00 2001 From: fangsmile <892739385@qq.com> Date: Mon, 23 Oct 2023 16:06:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20when=20columns=20is=20blank=20and=20set?= =?UTF-8?q?=20indicatorsAsCol=3Dfalse=EF=BC=8Cpivot=20show=20total=20value?= =?UTF-8?q?=20#440?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/vtable/src/dataset/dataset.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/vtable/src/dataset/dataset.ts b/packages/vtable/src/dataset/dataset.ts index 538ff4600..6287a2012 100644 --- a/packages/vtable/src/dataset/dataset.ts +++ b/packages/vtable/src/dataset/dataset.ts @@ -226,9 +226,7 @@ export class Dataset { this.rows, indicatorsAsCol ? undefined : indicators, this.rowsIsTotal, - this?.totals?.row?.showGrandTotals || - (!indicatorsAsCol && this.columns.length === 0) || - (indicatorsAsCol && this.rows.length === 0), + this?.totals?.row?.showGrandTotals || (indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel, this.rowSubTotalLabel ); @@ -245,7 +243,7 @@ export class Dataset { this.columns, indicatorsAsCol ? indicators : undefined, this.colsIsTotal, - this.totals?.column?.showGrandTotals, // || this.rows.length === 0,//todo 这里原有逻辑暂时注释掉 + this.totals?.column?.showGrandTotals || (!indicatorsAsCol && this.columns.length === 0), // || this.rows.length === 0,//todo 这里原有逻辑暂时注释掉 this.colGrandTotalLabel, this.colSubTotalLabel );