From b8e305ca86a486c6fd19f930e862bb82c70b4b5c Mon Sep 17 00:00:00 2001 From: hetech Date: Mon, 25 Mar 2019 19:31:10 +0800 Subject: [PATCH] Table: footer follows body cell align (#14730) --- packages/table/src/table-footer.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/table/src/table-footer.js b/packages/table/src/table-footer.js index bdbb7ccf3db..202555eb863 100644 --- a/packages/table/src/table-footer.js +++ b/packages/table/src/table-footer.js @@ -62,7 +62,7 @@ export default { + class={ this.getRowClasses(column, cellIndex) }>
{ 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; } } };