resolver-egretimp-plus 0.0.75 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -107,7 +107,15 @@ export default {
|
|
|
107
107
|
}
|
|
108
108
|
const sortList = [sortObj.value]
|
|
109
109
|
const ret = sortList.reduce((ret, item) => {
|
|
110
|
-
ret = ret.sort((a, b) =>
|
|
110
|
+
ret = ret.sort((a, b) => {
|
|
111
|
+
if (a[item.prop] === '' || a[item.prop] === undefined || a[item.prop] === null) {
|
|
112
|
+
return item.order === 'descending' ? -1 : 1
|
|
113
|
+
}
|
|
114
|
+
if (b[item.prop] === '' || b[item.prop] === undefined || b[item.prop] === null) {
|
|
115
|
+
return item.order === 'descending' ? 1 : -1
|
|
116
|
+
}
|
|
117
|
+
return (a[item.prop] > b[item.prop] ? (item.order === 'descending' ? 1 : -1) : a[item.prop] === b[item.prop] ? 0 : (item.order === 'descending' ? -1 : 1))
|
|
118
|
+
})
|
|
111
119
|
return ret
|
|
112
120
|
}, [...(normalTableData.value || [])])
|
|
113
121
|
return ret
|