Merge pull request #30 from slertness/master

fix:  table header style
pull/177/head
tangjinzhou 2018-06-04 11:13:54 +08:00 committed by GitHub
commit c578278500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -28,9 +28,7 @@ const TableHeaderRow = {
const { column, children, className, ...cellProps } = cell
const cls = cell.class || className
const customProps = column.customHeaderCell ? column.customHeaderCell(column) : {}
if (column.align) {
cellProps.style = { textAlign: column.align }
}
const headerCellProps = mergeProps({
attrs: {
...cellProps,
@ -40,6 +38,11 @@ const TableHeaderRow = {
...customProps,
key: column.key || column.dataIndex || i,
})
if (column.align) {
headerCellProps.style = { textAlign: column.align }
}
if (typeof HeaderCell === 'function') {
return HeaderCell(h, headerCellProps, children)
}