|
@@ -99,47 +99,47 @@ export default {
|
|
style={ this.getHeaderRowStyle(rowIndex) }
|
|
style={ this.getHeaderRowStyle(rowIndex) }
|
|
class={ this.getHeaderRowClass(rowIndex) }
|
|
class={ this.getHeaderRowClass(rowIndex) }
|
|
>
|
|
>
|
|
- {
|
|
|
|
- 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.handleHeaderClick($event, column) }
|
|
|
|
- style={ this.getHeaderCellStyle(rowIndex, cellIndex, columns, column) }
|
|
|
|
- class={ this.getHeaderCellClass(rowIndex, cellIndex, columns, column) }>
|
|
|
|
- <div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName] }>
|
|
|
|
- {
|
|
|
|
- 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" on-click={ ($event) => this.handleSortClick($event, column) }>
|
|
|
|
- <i class="sort-caret ascending" on-click={ ($event) => this.handleSortClick($event, column, 'ascending') }>
|
|
|
|
- </i>
|
|
|
|
- <i class="sort-caret descending" on-click={ ($event) => this.handleSortClick($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.hasGutter
|
|
|
|
- ? <th class="gutter" style={{ width: this.layout.scrollY ? this.layout.gutterWidth + 'px' : '0' }}></th>
|
|
|
|
- : ''
|
|
|
|
- }
|
|
|
|
|
|
+ {
|
|
|
|
+ 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.handleHeaderClick($event, column) }
|
|
|
|
+ style={ this.getHeaderCellStyle(rowIndex, cellIndex, columns, column) }
|
|
|
|
+ class={ this.getHeaderCellClass(rowIndex, cellIndex, columns, column) }>
|
|
|
|
+ <div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName] }>
|
|
|
|
+ {
|
|
|
|
+ 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" on-click={ ($event) => this.handleSortClick($event, column) }>
|
|
|
|
+ <i class="sort-caret ascending" on-click={ ($event) => this.handleSortClick($event, column, 'ascending') }>
|
|
|
|
+ </i>
|
|
|
|
+ <i class="sort-caret descending" on-click={ ($event) => this.handleSortClick($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.hasGutter
|
|
|
|
+ ? <th class="gutter" style={{ width: this.layout.scrollY ? this.layout.gutterWidth + 'px' : '0' }}></th>
|
|
|
|
+ : ''
|
|
|
|
+ }
|
|
</tr>
|
|
</tr>
|
|
)
|
|
)
|
|
}
|
|
}
|