mirror of https://github.com/ElemeFE/element
Table: footer follows body cell align (#14730)
parent
9736448b54
commit
9f19298d1a
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue