|
@@ -94,45 +94,45 @@ export default {
|
|
|
{
|
|
|
this._l(columnRows, (columns, rowIndex) =>
|
|
|
<tr>
|
|
|
- {
|
|
|
- this._l(columns, (column, cellIndex) =>
|
|
|
- <th
|
|
|
- colspan={ column.colSpan }
|
|
|
- rowspan={ column.rowSpan }
|
|
|
- on-mousemove={ ($event) => this.handleMouseMove($event, column) }
|
|
|
- on-mouseout={ this.handleMouseOut }
|
|
|
- on-mousedown={ ($event) => this.handleMouseDown($event, column) }
|
|
|
- on-click={ ($event) => this.handleClick($event, column) }
|
|
|
- class={ [column.id, column.order, column.headerAlign, column.className || '', rowIndex === 0 && this.isCellHidden(cellIndex) ? 'is-hidden' : '', !column.children ? 'is-leaf' : ''] }>
|
|
|
- <div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : ''] }>
|
|
|
- {
|
|
|
- column.renderHeader
|
|
|
- ? column.renderHeader.call(this._renderProxy, h, { column, $index: cellIndex, store: this.store, _self: this.$parent.$vnode.context })
|
|
|
- : column.label
|
|
|
- }
|
|
|
- {
|
|
|
- column.sortable
|
|
|
- ? <span class="caret-wrapper">
|
|
|
- <i class="sort-caret ascending" on-click={ ($event) => this.handleHeaderClick($event, column, 'ascending')}></i>
|
|
|
- <i class="sort-caret descending" on-click={ ($event) => this.handleHeaderClick($event, column, 'descending')}></i>
|
|
|
- </span>
|
|
|
- : ''
|
|
|
- }
|
|
|
- {
|
|
|
- column.filterable
|
|
|
- ? <span class="el-table__column-filter-trigger" on-click={ ($event) => this.handleFilterClick($event, column) }><i class={ ['el-icon-arrow-down', column.filterOpened ? 'el-icon-arrow-up' : ''] }></i></span>
|
|
|
- : ''
|
|
|
- }
|
|
|
- </div>
|
|
|
- </th>
|
|
|
- )
|
|
|
- }
|
|
|
- {
|
|
|
- !this.fixed && this.layout.gutterWidth
|
|
|
- ? <th class="gutter" style={{ width: this.layout.scrollY ? this.layout.gutterWidth + 'px' : '0' }}></th>
|
|
|
- : ''
|
|
|
- }
|
|
|
- </tr>
|
|
|
+ {
|
|
|
+ this._l(columns, (column, cellIndex) =>
|
|
|
+ <th
|
|
|
+ colspan={ column.colSpan }
|
|
|
+ rowspan={ column.rowSpan }
|
|
|
+ on-mousemove={ ($event) => this.handleMouseMove($event, column) }
|
|
|
+ on-mouseout={ this.handleMouseOut }
|
|
|
+ on-mousedown={ ($event) => this.handleMouseDown($event, column) }
|
|
|
+ on-click={ ($event) => this.handleClick($event, column) }
|
|
|
+ class={ [column.id, column.order, column.headerAlign, column.className || '', rowIndex === 0 && this.isCellHidden(cellIndex) ? 'is-hidden' : '', !column.children ? 'is-leaf' : ''] }>
|
|
|
+ <div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : ''] }>
|
|
|
+ {
|
|
|
+ column.renderHeader
|
|
|
+ ? column.renderHeader.call(this._renderProxy, h, { column, $index: cellIndex, store: this.store, _self: this.$parent.$vnode.context })
|
|
|
+ : column.label
|
|
|
+ }
|
|
|
+ {
|
|
|
+ column.sortable
|
|
|
+ ? <span class="caret-wrapper">
|
|
|
+ <i class="sort-caret ascending" on-click={ ($event) => this.handleHeaderClick($event, column, 'ascending')}></i>
|
|
|
+ <i class="sort-caret descending" on-click={ ($event) => this.handleHeaderClick($event, column, 'descending')}></i>
|
|
|
+ </span>
|
|
|
+ : ''
|
|
|
+ }
|
|
|
+ {
|
|
|
+ column.filterable
|
|
|
+ ? <span class="el-table__column-filter-trigger" on-click={ ($event) => this.handleFilterClick($event, column) }><i class={ ['el-icon-arrow-down', column.filterOpened ? 'el-icon-arrow-up' : ''] }></i></span>
|
|
|
+ : ''
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ </th>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ {
|
|
|
+ !this.fixed && this.layout.gutterWidth
|
|
|
+ ? <th class="gutter" style={{ width: this.layout.scrollY ? this.layout.gutterWidth + 'px' : '0' }}></th>
|
|
|
+ : ''
|
|
|
+ }
|
|
|
+ </tr>
|
|
|
)
|
|
|
}
|
|
|
</thead>
|