perf: commons

perf/export-docx
Lei OT 11 months ago
parent 8f43258d99
commit 4bc7e74825

@ -154,7 +154,7 @@ export function isEmpty(val) {
* 数组排序
*/
export const sortBy = key => {
return (a, b) => (a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0);
return (a, b) => (getNestedValue(a, key) > getNestedValue(b, key) ? 1 : getNestedValue(b, key) > getNestedValue(a, key) ? -1 : 0);
};
/**

Loading…
Cancel
Save