Table: sortable header discoverability

pull/6885/head
Leopoldthecoder 2017-09-06 10:16:34 +08:00 committed by 杨奕
parent 0e0f234428
commit fece184c64
2 changed files with 5 additions and 1 deletions

View File

@ -102,7 +102,7 @@ export default {
on-mouseout={ this.handleMouseOut }
on-mousedown={ ($event) => this.handleMouseDown($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' : '', column.labelClassName] }>
class={ [column.id, column.order, column.headerAlign, column.className || '', rowIndex === 0 && this.isCellHidden(cellIndex, columns) ? 'is-hidden' : '', !column.children ? 'is-leaf' : '', column.labelClassName, column.sortable ? 'is-sortable' : ''] }>
<div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName] }>
{
column.renderHeader

View File

@ -136,6 +136,10 @@
border-bottom: 1px solid var(--table-border-color);
}
& th.is-sortable {
cursor: pointer;
}
@modifier border {
& th, td {
border-right: 1px solid var(--table-border-color);