From 08e2cb70b89d33bd1929713c1ca4a7482495006b Mon Sep 17 00:00:00 2001 From: JuZe Date: Wed, 11 Oct 2023 10:37:09 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/src/facet/layout/node.ts | 3 +++ packages/s2-core/src/utils/layout/generate-header-nodes.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/s2-core/src/facet/layout/node.ts b/packages/s2-core/src/facet/layout/node.ts index cfc09d5466..e9e7ee0c0f 100644 --- a/packages/s2-core/src/facet/layout/node.ts +++ b/packages/s2-core/src/facet/layout/node.ts @@ -306,6 +306,9 @@ export class Node { public isTotalRoot?: boolean; + /** + * @deprecated 已废弃, 该属性只记录相邻一级的隐藏信息,将会在未来版本中移除 + */ public hiddenChildNodeInfo?: HiddenColumnsInfo | null; public extra?: Record; diff --git a/packages/s2-core/src/utils/layout/generate-header-nodes.ts b/packages/s2-core/src/utils/layout/generate-header-nodes.ts index 105f2405f6..aa33a7bf42 100644 --- a/packages/s2-core/src/utils/layout/generate-header-nodes.ts +++ b/packages/s2-core/src/utils/layout/generate-header-nodes.ts @@ -113,7 +113,7 @@ export const generateHeaderNodes = (params: HeaderNodesParams) => { // 如果当前是隐藏节点, 给其父节点挂载相应信息 (兄弟节点, 当前哪个子节点隐藏了), 这样在 facet 层可以直接使用, 不用每次都去遍历 const hiddenColumnsInfo = spreadsheet?.facet?.getHiddenColumnsInfo(node); if (hiddenColumnsInfo && parentNode) { - // hiddenChildNodeInfo 属性在 S2 中没有用到,但是没删怕外部有使用 + // hiddenChildNodeInfo 属性在 S2 中没有用到,但是没删怕外部有使用,已标记为废弃 parentNode.hiddenChildNodeInfo = hiddenColumnsInfo; }