多列排序平序问题
This commit is contained in:
parent
dae312519a
commit
d52c9c26ca
|
@ -51230,10 +51230,11 @@
|
|||
}
|
||||
});
|
||||
if (orderColslen > 0) {
|
||||
//第一层排序
|
||||
data = data.sort(function (a, b) {
|
||||
return self._sortBy(a, b, orderCols, orderColslen, 1);
|
||||
});
|
||||
} else {
|
||||
data = oldData.concat();;
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
@ -51282,13 +51283,13 @@
|
|||
return da.key == column.key;
|
||||
});
|
||||
seleObj.order = order;
|
||||
if (order === "flatscend") {
|
||||
_this.changeOrderNum(column);
|
||||
}
|
||||
if (!seleObj.orderNum && (order == 'ascend' || order == 'descend')) {
|
||||
seleObj.orderNum = _this.getOrderNum();
|
||||
}
|
||||
data = _this.multiSort(columns);
|
||||
if (order === "flatscend") {
|
||||
_this.changeOrderNum(column);
|
||||
}
|
||||
}
|
||||
|
||||
_this.setState({
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -111,12 +111,11 @@ export default function sort(Table, Icon) {
|
|||
}
|
||||
})
|
||||
if(orderColslen>0){
|
||||
//第一层排序
|
||||
data = data.sort(function(a, b) {
|
||||
return self._sortBy(a,b,orderCols,orderColslen,1);
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
data = oldData.concat();
|
||||
}
|
||||
return data;
|
||||
|
||||
|
@ -160,13 +159,13 @@ export default function sort(Table, Icon) {
|
|||
}else{
|
||||
seleObj = columns.find(da=>da.key == column.key);
|
||||
seleObj.order = order;
|
||||
if(!seleObj.orderNum && (order=='ascend'||order=='descend')){
|
||||
seleObj.orderNum = this.getOrderNum();
|
||||
}
|
||||
data = this.multiSort(columns);
|
||||
if(order === "flatscend"){
|
||||
this.changeOrderNum(column);
|
||||
}
|
||||
if(!seleObj.orderNum && (order=='ascend'||order=='descend')){
|
||||
seleObj.orderNum = this.getOrderNum();
|
||||
}
|
||||
data = this.multiSort(columns);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue