fix table header style
parent
012b68f990
commit
5ac461df07
|
@ -28,9 +28,7 @@ const TableHeaderRow = {
|
||||||
const { column, children, className, ...cellProps } = cell
|
const { column, children, className, ...cellProps } = cell
|
||||||
const cls = cell.class || className
|
const cls = cell.class || className
|
||||||
const customProps = column.customHeaderCell ? column.customHeaderCell(column) : {}
|
const customProps = column.customHeaderCell ? column.customHeaderCell(column) : {}
|
||||||
if (column.align) {
|
|
||||||
cellProps.style = { textAlign: column.align }
|
|
||||||
}
|
|
||||||
const headerCellProps = mergeProps({
|
const headerCellProps = mergeProps({
|
||||||
attrs: {
|
attrs: {
|
||||||
...cellProps,
|
...cellProps,
|
||||||
|
@ -40,6 +38,11 @@ const TableHeaderRow = {
|
||||||
...customProps,
|
...customProps,
|
||||||
key: column.key || column.dataIndex || i,
|
key: column.key || column.dataIndex || i,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (column.align) {
|
||||||
|
headerCellProps.style = { textAlign: column.align }
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof HeaderCell === 'function') {
|
if (typeof HeaderCell === 'function') {
|
||||||
return HeaderCell(h, headerCellProps, children)
|
return HeaderCell(h, headerCellProps, children)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue