From 69fe01adb759f55b1f758983c1c2faa2b233aa93 Mon Sep 17 00:00:00 2001 From: Kira Date: Tue, 6 Jul 2021 09:34:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/func/function.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/typescript/core/func/function.ts b/typescript/core/func/function.ts index d3e4c81aba..be102e561e 100644 --- a/typescript/core/func/function.ts +++ b/typescript/core/func/function.ts @@ -16,6 +16,13 @@ export type _function = { */ getSearchResult: (items: any, keyword: any, param?: string) => { find: any[], match: any[] }; + /** + * 获取按GB2312排序的结果 + * @param items + * @param key + */ + getSortedResult: (items: T[], key: string) => T[]; + /** * 在方法A执行之前执行方法B * @param sFunc 方法A From 6ca85637997ed126001c95efe352a8e1253a018f Mon Sep 17 00:00:00 2001 From: Kira Date: Tue, 6 Jul 2021 09:37:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/func/function.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/typescript/core/func/function.ts b/typescript/core/func/function.ts index be102e561e..031a2ddc41 100644 --- a/typescript/core/func/function.ts +++ b/typescript/core/func/function.ts @@ -16,6 +16,13 @@ export type _function = { */ getSearchResult: (items: any, keyword: any, param?: string) => { find: any[], match: any[] }; + /** + * 获取编码后的url + * @param urlTemplate url模板 + * @param param 参数 + */ + getEncodeURL: (urlTemplate: string, param: any) => string; + /** * 获取按GB2312排序的结果 * @param items From f50e3ad3b5c42d588cf9431160a944cb46855850 Mon Sep 17 00:00:00 2001 From: Kira Date: Tue, 6 Jul 2021 09:39:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/func/function.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/core/func/function.ts b/typescript/core/func/function.ts index 031a2ddc41..4da9ab104b 100644 --- a/typescript/core/func/function.ts +++ b/typescript/core/func/function.ts @@ -28,7 +28,7 @@ export type _function = { * @param items * @param key */ - getSortedResult: (items: T[], key: string) => T[]; + getSortedResult: (items: T[], key?: string | Function) => T[]; /** * 在方法A执行之前执行方法B