diff --git a/src/components/table/mixin.js b/src/components/table/mixin.js index 71c4b2c..697005e 100644 --- a/src/components/table/mixin.js +++ b/src/components/table/mixin.js @@ -1,6 +1,6 @@ export default { methods: { - alignCls (column, type, row = {}) { + alignCls (column, row = {}) { let cellClassName = ''; if (row.cellClassName && column.key && row.cellClassName[column.key]) { cellClassName = row.cellClassName[column.key]; @@ -8,7 +8,7 @@ export default { return [ { [`${cellClassName}`]: cellClassName, // cell className - [`${column.className}`]: column.className && type === 'body', // column className + [`${column.className}`]: column.className, // column className [`${this.prefixCls}-column-${column.align}`]: column.align, [`${this.prefixCls}-hidden`]: (this.fixed === 'left' && column.fixed !== 'left') || (this.fixed === 'right' && column.fixed !== 'right') || (!this.fixed && column.fixed && (column.fixed === 'left' || column.fixed === 'right')) } diff --git a/src/components/table/table-body.vue b/src/components/table/table-body.vue index 23effc7..b6bb8d3 100644 --- a/src/components/table/table-body.vue +++ b/src/components/table/table-body.vue @@ -11,7 +11,7 @@ @mouseleave.stop="handleMouseOut(row._index)" @click.stop="clickCurrentRow(row._index)" @dblclick.stop="dblclickCurrentRow(row._index)"> - + - +