Skip to content

Commit

Permalink
Table: footer follows body cell align (ElemeFE#14730)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyoung authored and Feng committed Jun 20, 2019
1 parent 8889a14 commit e9fe207
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/table/src/table-footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default {
<td
colspan={ column.colSpan }
rowspan={ column.rowSpan }
class={ [column.id, column.headerAlign, column.className || '', this.isCellHidden(cellIndex, this.columns, column) ? 'is-hidden' : '', !column.children ? 'is-leaf' : '', column.labelClassName] }>
class={ this.getRowClasses(column, cellIndex) }>
<div class={ ['cell', column.labelClassName] }>
{
sums[cellIndex]
Expand Down Expand Up @@ -152,6 +152,20 @@ export default {
} else {
return (index < this.leftFixedCount) || (index >= this.columnsCount - this.rightFixedCount);
}
},

getRowClasses(column, cellIndex) {
const classes = [column.id, column.align, column.labelClassName];
if (column.className) {
classes.push(column.className);
}
if (this.isCellHidden(cellIndex, this.columns, column)) {
classes.push('is-hidden');
}
if (!column.children) {
classes.push('is-leaf');
}
return classes;
}
}
};

0 comments on commit e9fe207

Please sign in to comment.