Skip to content

Commit

Permalink
docs(Table): describe alignHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna authored and guanpu committed Jan 25, 2019
1 parent 7f99ed0 commit a49f674
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions docs/table/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ ReactDOM.render(
| sortable | whether to support sorting | Boolean | - |
| width | width of column,width needs to be set in lock style | Number/String | - |
| align | alignment of cell<br><br>**options**:<br>'left', 'center', 'right' | Enum | - |
| alignHeader | alignment of header cell, value of align by default<br><br>**options**:<br>'left', 'center', 'right' | Enum | - |
| filters | generates a title filter menu in the format `[{label:'xxx', value:'xxx'}]` | Array&lt;Object> | - |
| filterMode | whether the filtering mode is single or multiple selection<br><br>**options**:<br>'single', 'multiple' | Enum | 'multiple' |
| lock | whether the lock column is supported, the options are `left`, `right`, `true` | Boolean/String | - |
Expand Down
25 changes: 13 additions & 12 deletions docs/table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,19 @@ ReactDOM.render(

### Table.Column

| 参数 | 说明 | 类型 | 默认值 |
| ---------- | --------------------------------------------------------------------------------------------------- | ------------------------------- | ---------------- |
| dataIndex | 指定列对应的字段,支持`a.b`形式的快速取值 | String | - |
| cell | 行渲染的逻辑<br>value, rowIndex, record, context四个属性只可读不可被更改<br>Function(value, index, record) => Element | ReactElement/ReactNode/Function | (value) => value |
| title | 表头显示的内容<br>value, rowIndex, record, context四个属性只可读不可被更改 | ReactElement/ReactNode/Function | - |
| sortable | 是否支持排序 | Boolean | - |
| width | 列宽,注意在锁列的情况下一定需要配置宽度 | Number/String | - |
| align | 单元格的对齐方式<br><br>**可选值**:<br>'left', 'center', 'right' | Enum | - |
| filters | 生成标题过滤的菜单, 格式为`[{label:'xxx', value:'xxx'}]` | Array&lt;Object> | - |
| filterMode | 过滤的模式是单选还是多选<br><br>**可选值**:<br>'single', 'multiple' | Enum | 'multiple' |
| lock | 是否支持锁列,可选值为`left`,`right`, `true` | Boolean/String | - |
| resizable | 是否支持列宽调整, 当该值设为true,table的布局方式会修改为fixed. | Boolean | false |
| 参数 | 说明 | 类型 | 默认值 |
| ----------- | --------------------------------------------------------------------------------------------------- | ------------------------------- | ---------------- |
| dataIndex | 指定列对应的字段,支持`a.b`形式的快速取值 | String | - |
| cell | 行渲染的逻辑<br>value, rowIndex, record, context四个属性只可读不可被更改<br>Function(value, index, record) => Element | ReactElement/ReactNode/Function | (value) => value |
| title | 表头显示的内容<br>value, rowIndex, record, context四个属性只可读不可被更改 | ReactElement/ReactNode/Function | - |
| sortable | 是否支持排序 | Boolean | - |
| width | 列宽,注意在锁列的情况下一定需要配置宽度 | Number/String | - |
| align | 单元格的对齐方式<br><br>**可选值**:<br>'left', 'center', 'right' | Enum | - |
| alignHeader | 单元格标题的对齐方式, 不配置默认读取align值<br><br>**可选值**:<br>'left', 'center', 'right' | Enum | - |
| filters | 生成标题过滤的菜单, 格式为`[{label:'xxx', value:'xxx'}]` | Array&lt;Object> | - |
| filterMode | 过滤的模式是单选还是多选<br><br>**可选值**:<br>'single', 'multiple' | Enum | 'multiple' |
| lock | 是否支持锁列,可选值为`left`,`right`, `true` | Boolean/String | - |
| resizable | 是否支持列宽调整, 当该值设为true,table的布局方式会修改为fixed. | Boolean | false |

### Table.ColumnGroup

Expand Down
2 changes: 1 addition & 1 deletion src/table/column.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class Column extends React.Component {
*/
align: PropTypes.oneOf(['left', 'center', 'right']),
/**
* 单元格标题的对齐方式
* 单元格标题的对齐方式, 不配置默认读取align值
*/
alignHeader: PropTypes.oneOf(['left', 'center', 'right']),
/**
Expand Down

0 comments on commit a49f674

Please sign in to comment.