this.tableData.sort(this.compare(‘formateDate‘))
compare(property){
return function(a,b){
var value1 = a[property];
var value2 = b[property];
return value2 - value1;
}
}
原文:https://www.cnblogs.com/huangbinlooksgood/p/14198247.html