mirror of https://github.com/ElemeFE/element
Table: support sort-by, use isArray to test sortBy
parent
7074a247f4
commit
0a24f05125
|
@ -28,7 +28,7 @@ export const orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {
|
|||
}
|
||||
const getKey = sortMethod ? null : function(value, index) {
|
||||
if (sortBy) {
|
||||
if (!Array.isArray) {
|
||||
if (!Array.isArray(sortBy)) {
|
||||
sortBy = [sortBy];
|
||||
}
|
||||
return sortBy.map(function(by) {
|
||||
|
|
Loading…
Reference in New Issue