Skip to content

Commit

Permalink
docs: getAllCells()获取数据说明问题
Browse files Browse the repository at this point in the history
  • Loading branch information
stone-lyl committed Aug 3, 2022
1 parent c3558a0 commit 692b1f7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 41 deletions.
5 changes: 5 additions & 0 deletions packages/s2-react/playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,11 @@ function MainLayout() {
exportCfg: { open: true },
advancedSortCfg: { open: true },
}}
getSpreadSheet={(s2) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
window.s2 = s2;
}}
onDataCellTrendIconClick={logHandler('onDataCellTrendIconClick')}
onAfterRender={logHandler('onAfterRender')}
onDestroy={logHandler('onDestroy')}
Expand Down
82 changes: 41 additions & 41 deletions s2-site/docs/api/basic-class/interaction.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,48 @@ order: 2
s2.interaction.xx()
```

| 参数 | 说明 | 类型 |
| --- | --- | --- |
| spreadsheet | 表格实例 | [SpreadSheet](/zh/docs/api/basic-class/spreadsheet) |
| interactions | 当前已注册的交互 | `Map<string, BaseEvent>` |
| intercept | 当前拦截的交互,防止不同交互之间冲突 | `Set<Intercept>` |
| destroy | 卸载所有交互实例,并重置为初始状态 | `() => void` |
| reset | 重置所有交互 | `() => void` |
| setState | 设置状态 | (data: [InteractionStateInfo](#interactionstateinfo)) => void |
| getState | 获取当前状态 | `() => void` |
| resetState | 重置为初始状态 | `() => void` |
| clearState | 清空状态,并重绘 | `() => void` |
| changeState | 更新状态 | (data: [InteractionStateInfo](#interactionstateinfo)) => void |
| setInteractedCells | 设置当前发生改变的单元格 | (cell: [S2CellType](#s2celltype)) => void |
| getInteractedCells | 获取当前发生改变的单元格 | () => [S2CellType](#s2celltype)[] |
| getCurrentStateName | 获取当前状态名 | `() => void` |
| isEqualStateName | 是否是相同的状态名 | `(name: InteractionStateName) => void` |
| isSelectedState | 是否是选中状态 | `() => void` |
| isHoverState | 是否是悬停状态 | `() => void` |
| isHoverFocusState | 是否是悬停聚焦状态 (悬停在单元格 `focusTime`: 默认 800ms 后) | `() => void` |
| isSelectedCell | 是否是选中的单元格 | (cell: [S2CellType](#s2celltype)) => void |
| isActiveCell | 是否是激活的单元格 | (cell: [S2CellType](#s2celltype)) => void |
| getCells | 获取当前 interaction 记录的 Cells 元信息列表,包括不在视口内的格子 | `() => Partial<ViewMeta>[]` |
| getActiveCells | 获取当前在可视区域的单元格实例 | `() => S2CellType[]` |
| clearStyleIndependent | 清除单元格样式 | `() => void` |
| getPanelGroupAllUnSelectedDataCells | 获取可视区域内选中的数值单元格 | `() => DataCell[]` |
| getPanelGroupAllDataCells | 获取可视区域内的所有数值单元格 | `() => DataCell[]` |
| getAllRowHeaderCells | 获取行头单元格 | `() => RowCell[]` |
| getAllColHeaderCells | 获取列头单元格 | `() => ColCell[]` |
| getRowColActiveCells | 获取行头和列头激活的单元格 | `() => RowCell[] | ColCell[]` |
| getAllCells | 获取所有单元格 | () => [S2CellType](#s2celltype)[] |
| selectAll | 选中所有单元格 | `() => void` |
| selectHeaderCell | 选中指定行列头单元格 | (selectHeaderCellInfo: [SelectHeaderCellInfo](#selectheadercellinfo)) => boolean |
| getCellChildrenNodes | 获取当前单元格的所以子节点 | (cell: [S2CellType](#s2celltype)) => [Node]((/zh/docs/api/basic-class/node))[] |
| 参数 | 说明 | 类型 |
| --- |--------------------------------------------------| --- |
| spreadsheet | 表格实例 | [SpreadSheet](/zh/docs/api/basic-class/spreadsheet) |
| interactions | 当前已注册的交互 | `Map<string, BaseEvent>` |
| intercept | 当前拦截的交互,防止不同交互之间冲突 | `Set<Intercept>` |
| destroy | 卸载所有交互实例,并重置为初始状态 | `() => void` |
| reset | 重置所有交互 | `() => void` |
| setState | 设置状态 | (data: [InteractionStateInfo](#interactionstateinfo)) => void |
| getState | 获取当前状态 | `() => void` |
| resetState | 重置为初始状态 | `() => void` |
| clearState | 清空状态,并重绘 | `() => void` |
| changeState | 更新状态 | (data: [InteractionStateInfo](#interactionstateinfo)) => void |
| setInteractedCells | 设置当前发生改变的单元格 | (cell: [S2CellType](#s2celltype)) => void |
| getInteractedCells | 获取当前发生改变的单元格 | () => [S2CellType](#s2celltype)[] |
| getCurrentStateName | 获取当前状态名 | `() => void` |
| isEqualStateName | 是否是相同的状态名 | `(name: InteractionStateName) => void` |
| isSelectedState | 是否是选中状态 | `() => void` |
| isHoverState | 是否是悬停状态 | `() => void` |
| isHoverFocusState | 是否是悬停聚焦状态 (悬停在单元格 `focusTime`: 默认 800ms 后) | `() => void` |
| isSelectedCell | 是否是选中的单元格 | (cell: [S2CellType](#s2celltype)) => void |
| isActiveCell | 是否是激活的单元格 | (cell: [S2CellType](#s2celltype)) => void |
| getCells | 获取当前 interaction 记录的 Cells 元信息列表,包括不在视口内的格子 | `() => Partial<ViewMeta>[]` |
| getActiveCells | 获取当前在可视区域的单元格实例 | `() => S2CellType[]` |
| clearStyleIndependent | 清除单元格样式 | `() => void` |
| getPanelGroupAllUnSelectedDataCells | 获取可视区域内选中的数值单元格 | `() => DataCell[]` |
| getPanelGroupAllDataCells | 获取可视区域内的所有数值单元格 | `() => DataCell[]` |
| getAllRowHeaderCells | 获取行头单元格 | `() => RowCell[]` |
| getAllColHeaderCells | 获取列头单元格 | `() => ColCell[]` |
| getRowColActiveCells | 获取行头和列头激活的单元格 | `() => RowCell[] | ColCell[]` |
| getAllCells | 获取所有可视区域内的单元格 | () => [S2CellType](#s2celltype)[] |
| selectAll | 选中所有单元格 | `() => void` |
| selectHeaderCell | 选中指定行列头单元格 | (selectHeaderCellInfo: [SelectHeaderCellInfo](#selectheadercellinfo)) => boolean |
| getCellChildrenNodes | 获取当前单元格的所以子节点 | (cell: [S2CellType](#s2celltype)) => [Node]((/zh/docs/api/basic-class/node))[] |
| hideColumns | 隐藏列 (forceRender 为 `false` 时,隐藏列为空的情况下,不再触发表格更新) | `(hiddenColumnFields: string[], forceRender?: boolean = true) => void` |
| mergeCells | 合并单元格 | (cellsInfo?: [MergedCellInfo](#mergedcellinfo)[], hideData?: boolean) => void |
| unmergeCells | 取消合并单元格 | `(removedCells: MergedCell[]) => void` |
| updatePanelGroupAllDataCells | 更新所有数值单元格 | `() => void` |
| updateCells | 更新指定单元格 | (cells: [S2CellType](#s2celltype)[]) => void |
| addIntercepts | 新增交互拦截 | (interceptTypes: [InterceptType](#intercepttype)[]) => void |
| hasIntercepts | 是否有指定拦截的交互 | (interceptTypes: [InterceptType](#intercepttype)[]) => boolean |
| removeIntercepts | 移除指定交互拦截 | (interceptTypes: [InterceptType](#intercepttype)[]) => void |
| highlightNodes | 高亮节点对应的单元格 | (nodes: [Node](/zh/docs/api/basic-class/node)[]) => void |
| mergeCells | 合并单元格 | (cellsInfo?: [MergedCellInfo](#mergedcellinfo)[], hideData?: boolean) => void |
| unmergeCells | 取消合并单元格 | `(removedCells: MergedCell[]) => void` |
| updatePanelGroupAllDataCells | 更新所有数值单元格 | `() => void` |
| updateCells | 更新指定单元格 | (cells: [S2CellType](#s2celltype)[]) => void |
| addIntercepts | 新增交互拦截 | (interceptTypes: [InterceptType](#intercepttype)[]) => void |
| hasIntercepts | 是否有指定拦截的交互 | (interceptTypes: [InterceptType](#intercepttype)[]) => boolean |
| removeIntercepts | 移除指定交互拦截 | (interceptTypes: [InterceptType](#intercepttype)[]) => void |
| highlightNodes | 高亮节点对应的单元格 | (nodes: [Node](/zh/docs/api/basic-class/node)[]) => void |

`markdown:docs/common/interaction.zh.md`

Expand Down

0 comments on commit 692b1f7

Please sign in to comment.