Table: footer follows body cell align (#14730)

pull/14844/head
hetech 2019-03-25 19:31:10 +08:00 committed by GitHub
parent 9736448b54
commit 9f19298d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -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]
@ -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;
}
}
};