1. The default sorting of table components (this sorting can only sort a certain column of data on the current page)
Just need to look like this:
<el-table-column sortable />
code:
2. Remote sorting of table components (the interface will be called to sort all the data in a column)
1. The @sort-change event should be used in the formation of <el-table>, as follows:
2. Use in <el-table-column />: sort-orders="['ascending', 'descending']" and sortable="custom"
as follows:
3. To register the trigger sorting method in methods, as follows: