Element-ui table 手动设置排序

2,058 阅读1分钟

基于sort方法

手动对 Table 进行排序

说明:参数prop属性指定排序列,order指定排序顺序
参数:prop: string, order: string
/** domainTable:table设置的ref 
 * 'total':排序列
 * 'descending':顺序
*/
this.$refs.domainTable.sort('total', 'descending')