el-table排序的问题
<el-table
ref="tableList"
:data="tableData"
:default-sort = "{prop: 'date', order: 'descending'}"
@sort-change="sortChange"
>
<el-table-column
prop="date"
label="日期"
sortable="custom" <!--后台排序-->
></el-table-column>
<el-table>
重置排序或清空排序
resetSort(){
this.$refs.tableList.sort('date', 'descending')
},
clearSort(){
this.$refs.tableList.clearSort()
}