Skip to content

Commit

Permalink
Docs: 2.2.0,change formatDate/getV/websocket 。
Browse files Browse the repository at this point in the history
  • Loading branch information
pandaoh committed Jan 18, 2024
1 parent 80e8c04 commit d00abd0
Show file tree
Hide file tree
Showing 362 changed files with 7,374 additions and 1,274 deletions.
36 changes: 36 additions & 0 deletions dist/Data/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ export declare const BLOOD_GROUP: {
O: string;
AB: string;
};
/**
* @const
* 血型基础信息
*/
export declare const BLOOD_GROUP_INFO: {
[key: string]: {
value: string;
label: string;
color: string;
lower: string;
upper: string;
};
};
/**
* @const
* 角色管理对象
Expand Down Expand Up @@ -164,6 +177,29 @@ export declare const BASE_CHAR_UP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
* 进制转换基础数据
*/
export declare const TRANSFER_STR: string;
/**
* @const
* 颜色数据
*/
export declare const BS_COLORS: {
dark: string;
black: string;
light: string;
white: string;
info: string;
cyan: string;
success: string;
green: string;
warning: string;
yellow: string;
danger: string;
red: string;
primary: string;
blue: string;
secondary: string;
default: string;
grey: string;
};
/**
* @const
* ICONS 通用小图标
Expand Down
2 changes: 1 addition & 1 deletion dist/Data/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions dist/Date/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
* 时间格式化
* @example
* formatDate(new Date(), 'yyyy-mm-dd hh:ii:ss Q S W', ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']); /// '2022-04-26 11:33:53 2 123 星期二'
* // @before-2.2.0
* formatDate(); /// '当前时间 yyyy-mm-dd hh:ii:ss'
* // @since-2.2.0
* formatDate(); /// undefined
* @param date 时间
* @param fmt 格式化模板 'yyyy-mm-dd hh:ii:ss'
* @param weeks 星期对应数组 [7, 1, 2, 3, 4, 5, 6]
* @returns
*/
export declare function formatDate(date?: string | Date, fmt?: string, weeks?: any[]): string;
export declare function formatDate(date?: any, fmt?: string, weeks?: any[]): any;
/**
* 时间计算
* @example
Expand Down Expand Up @@ -44,7 +48,7 @@ export declare function getDateDifference(oldDate: string | Date, nowDate?: stri
* @param formatter 正常显示时的时间显示格式
* @returns
*/
export declare function timeSince(date?: string | Date, longAgo?: boolean, formatter?: string): string;
export declare function timeSince(date?: string | Date, longAgo?: boolean, formatter?: string): any;
/**
* 检查所提供的日期是否为工作日
* @example
Expand Down
2 changes: 1 addition & 1 deletion dist/Date/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions dist/Math/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ export declare function sub(sub1: number | string, sub2: number | string): numbe
* @returns
*/
export declare function average(...args: any[]): number;
/**
* 计算所有数
* @example
* calculate('+', 1, 2, 3, 4); /// 10
* calculate('+', 1, 2, 3, undefined); /// 6
* calculate('*', 1, 2, 3); /// 6
* calculate('*', 1, 2, 3, undefined); /// 0
* calculate('-', 10, 2, 3); /// 5
* calculate('/', 10, 2, 2); /// 2.5
* @param operator 操作符
* @param args 需要计算的数...
* @returns
*/
export declare function calculate(operator: string, ...args: any[]): number;
/**
* 获取绝对值
* @example
Expand Down
2 changes: 1 addition & 1 deletion dist/Math/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions dist/Object/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
* 获取多级对象值
* @example
* getV('默认值', {name: {children: [123, 456]}}, 'name', 'children', '0'); /// 123
* getV('默认值', {name: {children: [123, 456]}}, 'name.children.0'); /// 123
* getV('默认值', {name: {children: [123, 456]}}, 'name.children.xxx'); /// 默认值
* getV('默认值', { name: {children: [123, 456], '[]': ['test']} }, 'name.[].0'); /// 'test'
* getV('默认值', { name: {children: [123, 456], '[]': ['test']} }, 'name', '[]', 0); /// 'test'
* @param defaultResult 默认值
* @param args 需要获取的多级 rest 参数
* @returns
Expand Down Expand Up @@ -58,4 +62,22 @@ export declare function every(collection: any, callback?: any): boolean;
* @returns
*/
export declare function findMaxKey(objArray: any[]): never[];
/**
* 转化为 Select 数据,至少有 label/value/key 字段。
* @example
* arr2select([{ id: 1, name: 'A' }, { id: 2, name: 'B' }], { label: 'name', value: 'id' });
* /// [{ label: 'A', value: 1, key: 'selectKey-Random1' }, { label: 'B', value: 2, key: 'selectKey-Random2' }]
* arr2select([{ id: 1, name: 'A' }, { id: 2, name: 'B' }], { value: 'id', key: 'UNDEFINED' });
* /// [{ label: 1, value: 1, key: 1 }, { label: 2, value: 2, key: 2 }]
* arr2select([{ data: { id: 1, name: 'A' }, key: 'test1' }, { data: { id: 2, name: 'B' }, key: 'test2' }], { value: 'data.id', key: 'key', label: 'data.name' });
* /// [{ value: 1, label: "A", key: "test1" }, { value: 2, label: "B", key: "test2" }]
* @param arr 数组
* @param options 配置 { label?: 'label', value: 'value', key?: 'key' }
* @returns 转换后的 Select 数据数组
*/
export declare function arr2select(arr: any[], options: {
label?: string;
value: string;
key?: string;
}): any[];
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion dist/Object/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/Others/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d00abd0

Please sign in to comment.