diff --git a/typescript/core/func/function.ts b/typescript/core/func/function.ts index d3e4c81ab..4da9ab104 100644 --- a/typescript/core/func/function.ts +++ b/typescript/core/func/function.ts @@ -16,6 +16,20 @@ 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 + * @param key + */ + getSortedResult: (items: T[], key?: string | Function) => T[]; + /** * 在方法A执行之前执行方法B * @param sFunc 方法A