add labelClassName

pull/3391/head
张韧 2017-03-08 19:14:36 +08:00 committed by 杨奕
parent a87b6e2e94
commit b29ce95b81
2 changed files with 4 additions and 2 deletions

View File

@ -118,6 +118,7 @@ export default {
}, },
label: String, label: String,
className: String, className: String,
labelClassName: String,
property: String, property: String,
prop: String, prop: String,
width: {}, width: {},
@ -213,6 +214,7 @@ export default {
columnKey: this.columnKey, columnKey: this.columnKey,
label: this.label, label: this.label,
className: this.className, className: this.className,
labelClassName: this.labelClassName,
property: this.prop || this.property, property: this.prop || this.property,
type, type,
renderCell: null, renderCell: null,

View File

@ -101,8 +101,8 @@ export default {
on-mouseout={ this.handleMouseOut } on-mouseout={ this.handleMouseOut }
on-mousedown={ ($event) => this.handleMouseDown($event, column) } on-mousedown={ ($event) => this.handleMouseDown($event, column) }
on-click={ ($event) => this.handleHeaderClick($event, column) } on-click={ ($event) => this.handleHeaderClick($event, column) }
class={ [column.id, column.order, column.headerAlign, column.className || '', rowIndex === 0 && this.isCellHidden(cellIndex, columns) ? 'is-hidden' : '', !column.children ? 'is-leaf' : ''] }> class={ [column.id, column.order, column.headerAlign, column.className || '', rowIndex === 0 && this.isCellHidden(cellIndex, columns) ? 'is-hidden' : '', !column.children ? 'is-leaf' : '', column.labelClassName] }>
<div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : ''] }> <div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName] }>
{ {
column.renderHeader column.renderHeader
? column.renderHeader.call(this._renderProxy, h, { column, $index: cellIndex, store: this.store, _self: this.$parent.$vnode.context }) ? column.renderHeader.call(this._renderProxy, h, { column, $index: cellIndex, store: this.store, _self: this.$parent.$vnode.context })