From f9f1865ca503097bf93bc2b88214b815c48472b6 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Tue, 10 Jan 2017 16:33:44 +0800 Subject: [PATCH] Table columns add className --- src/components/table/mixin.js | 3 ++- src/components/table/table-body.vue | 2 +- src/components/table/table-head.vue | 2 +- test/routers/cascader.vue | 32 +++++++++++++++++++++++++++----- test/routers/more.vue | 11 +++++++---- test/routers/table.vue | 415 ++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 files changed, 72 insertions(+), 393 deletions(-) diff --git a/src/components/table/mixin.js b/src/components/table/mixin.js index 6223dc5..02ed257 100644 --- a/src/components/table/mixin.js +++ b/src/components/table/mixin.js @@ -1,8 +1,9 @@ export default { methods: { - alignCls (column) { + alignCls (column, type) { return [ { + [`${column.className}`]: column.className && type === 'body', [`${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 bb73685..287ba5e 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)"> - + - +