From ee7aa3317bce85786b65249b4a1cf6ba5d5423e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E9=AA=A5?= Date: Fri, 2 Dec 2022 20:29:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9A=B4=E9=9C=B2afterRealCellRender?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E6=A0=B7=E8=83=BD=E5=A4=9F=E6=9B=B4=E7=81=B5?= =?UTF-8?q?=E6=B4=BB=E7=9A=84=E4=BD=BF=E7=94=A8datacell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/src/cell/data-cell.ts | 4 +--- packages/s2-core/src/common/interface/s2Options.ts | 1 + packages/s2-core/src/facet/base-facet.ts | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/s2-core/src/cell/data-cell.ts b/packages/s2-core/src/cell/data-cell.ts index 1d8f03cce7..00afa3eb01 100644 --- a/packages/s2-core/src/cell/data-cell.ts +++ b/packages/s2-core/src/cell/data-cell.ts @@ -178,9 +178,7 @@ export class DataCell extends BaseCell { this.drawTextShape(); this.drawConditionIconShapes(); } - if (this.meta.isFrozenCorner) { - this.drawBorderShape(); - } + this.drawBorderShape(); this.update(); } diff --git a/packages/s2-core/src/common/interface/s2Options.ts b/packages/s2-core/src/common/interface/s2Options.ts index 1729e80677..4c3c1edc3b 100644 --- a/packages/s2-core/src/common/interface/s2Options.ts +++ b/packages/s2-core/src/common/interface/s2Options.ts @@ -125,6 +125,7 @@ export interface S2Options S2PivotSheetOptions { // custom data set dataSet?: (spreadsheet: SpreadSheet) => BaseDataSet; + afterRealCellRender?: (spreadsheet: SpreadSheet) => void; } export interface S2RenderOptions { diff --git a/packages/s2-core/src/facet/base-facet.ts b/packages/s2-core/src/facet/base-facet.ts index fa605b817a..7e49aec491 100644 --- a/packages/s2-core/src/facet/base-facet.ts +++ b/packages/s2-core/src/facet/base-facet.ts @@ -1066,6 +1066,9 @@ export abstract class BaseFacet { ); }); this.preCellIndexes = indexes; + if (this.spreadsheet.options.afterRealCellRender) { + this.spreadsheet.options.afterRealCellRender(this.spreadsheet); + } }; protected init() {