diff --git a/components/table/index.en-US.md b/components/table/index.en-US.md index 83edb7e324..e4ba0c4fbf 100644 --- a/components/table/index.en-US.md +++ b/components/table/index.en-US.md @@ -126,7 +126,7 @@ One of the Table `columns` prop for describing the table's columns, Column has t | sortOrder | Order of sorted values: `'ascend'` `'descend'` `false` | boolean\|string | - | | title | Title of this column | ReactNode\|({ sortOrder, filters }) => ReactNode | - | | width | Width of this column | string\|number | - | -| onCell | Set props on per cell | Function(record) | - | +| onCell | Set props on per cell | Function(record, rowIndex) | - | | onFilter | Callback executed when the confirm filter button is clicked | Function | - | | onFilterDropdownVisibleChange | Callback executed when `filterDropdownVisible` is changed | function(visible) {} | - | | onHeaderCell | Set props on per header cell | Function(column) | - | diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index ef2a63573c..d123f9a43f 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -131,7 +131,7 @@ const columns = [{ | sortOrder | 排序的受控属性,外界可用此控制列的排序,可设置为 `'ascend'` `'descend'` `false` | boolean\|string | - | | title | 列头显示文字 | ReactNode\|({ sortOrder, filters }) => ReactNode | - | | width | 列宽度 | string\|number | - | -| onCell | 设置单元格属性 | Function(record) | - | +| onCell | 设置单元格属性 | Function(record, rowIndex) | - | | onFilter | 本地模式下,确定筛选的运行函数 | Function | - | | onFilterDropdownVisibleChange | 自定义筛选菜单可见变化时调用 | function(visible) {} | - | | onHeaderCell | 设置头部单元格属性 | Function(column) | - | diff --git a/components/table/interface.tsx b/components/table/interface.tsx index 60f31247b1..e7f5ddfd77 100644 --- a/components/table/interface.tsx +++ b/components/table/interface.tsx @@ -35,7 +35,7 @@ export interface ColumnProps { sortOrder?: SortOrder; children?: ColumnProps[]; onCellClick?: (record: T, event: any) => void; - onCell?: (record: T) => any; + onCell?: (record: T, rowIndex: number) => any; onHeaderCell?: (props: ColumnProps) => any; }