zzz-pc-view 0.0.165 → 0.0.166

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.
@@ -10,3 +10,11 @@ import { KeyMatch } from '../DeclareType';
10
10
  * @returns {T[]} 返回排序后的列表。
11
11
  */
12
12
  export declare const sort: <T>(list: T[], sortKey: KeyMatch<T, undefined | number>) => T[];
13
+ /**
14
+ * 通用数组排序函数
15
+ * @param arr 待排序对象数组
16
+ * @param field 排序字段key
17
+ * @param order 排序方向 asc升序 / desc降序,默认asc
18
+ * @param nullLast null/undefined 是否放末尾,默认true
19
+ */
20
+ export declare const sortByField: <T>(arr: T[], field: keyof T, order?: 1 | -1, nullLast?: boolean) => T[];