多列排序

This commit is contained in:
wanghaoo 2018-09-27 15:20:36 +08:00
parent d52c9c26ca
commit 9286ecb3bd
3 changed files with 8 additions and 20 deletions

13
dist/demo.js vendored
View File

@ -51200,8 +51200,6 @@
_this.setState({ columns: columns });
};
_this.getColAndOrderType = function () {};
_this._sortBy = function (pre, after, orderCols, orderColslen, currentIndex) {
var preKey = pre[orderCols[currentIndex].key];
var afterKey = after[orderCols[currentIndex].key];
@ -51234,7 +51232,7 @@
return self._sortBy(a, b, orderCols, orderColslen, 1);
});
} else {
data = oldData.concat();;
data = oldData.concat();
}
return data;
};
@ -51291,7 +51289,6 @@
}
data = _this.multiSort(columns);
}
_this.setState({
data: data,
oldData: oldData,
@ -51376,15 +51373,13 @@
});
}
};
//当有的列不排序时将该列的orderNum置为并动态的修改其他列的orderNum。
/**
* column 当前的排序的列
*/
/**
* 获取排序方式
* column 当前的排序的列
* 当有的列不排序时将该列的orderNum置为并动态的修改其他列的orderNum
*/
/**
* pre前一条数据
* after:后一条数据

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -57,9 +57,10 @@ export default function sort(Table, Icon) {
})
return orderNum?orderNum:1;
}
//当有的列不排序时将该列的orderNum置为并动态的修改其他列的orderNum。
/**
* column 当前的排序的列
* 当有的列不排序时将该列的orderNum置为并动态的修改其他列的orderNum
*/
changeOrderNum = (column)=>{
let {columns} = this.state;
@ -74,12 +75,7 @@ export default function sort(Table, Icon) {
this.setState({columns});
}
/**
* 获取排序方式
*/
getColAndOrderType = ()=>{
}
/**
* pre前一条数据
* after:后一条数据
@ -167,9 +163,6 @@ export default function sort(Table, Icon) {
}
data = this.multiSort(columns);
}
this.setState({
data,
oldData,