Skip to content

Commit

Permalink
chore: 删除无用代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zishang committed Dec 9, 2022
1 parent 1825ac4 commit 4ddf863
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/s2-core/src/utils/export/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,17 +380,13 @@ function getPivotCopyData(
: getPivotWithoutHeaderCopyData(spreadsheet, allRowLeafNodes, colNodes);
}

function isTreeMode(spreadsheet: SpreadSheet) {
return spreadsheet.options.hierarchyType === 'tree';
}

const processPivotColSelected = (
spreadsheet: SpreadSheet,
selectedCols: CellMeta[],
): Copyable => {
const allRowLeafNodes = spreadsheet
.getRowNodes()
.filter((node) => node.isLeaf || isTreeMode(spreadsheet));
.filter((node) => node.isLeaf || spreadsheet.isHierarchyTreeType());
const allColLeafNodes = spreadsheet
.getColumnNodes()
.filter((node) => node.isLeaf);
Expand Down Expand Up @@ -443,7 +439,7 @@ const processPivotRowSelected = (
): Copyable => {
const allRowLeafNodes = spreadsheet
.getRowNodes()
.filter((node) => node.isLeaf || isTreeMode(spreadsheet));
.filter((node) => node.isLeaf || spreadsheet.isHierarchyTreeType());
const allColLeafNodes = spreadsheet
.getColumnNodes()
.filter((node) => node.isLeaf);
Expand Down

0 comments on commit 4ddf863

Please sign in to comment.