@haluo/util 1.0.31 → 1.0.33

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.
@@ -1,27 +0,0 @@
1
- interface ICookie {
2
- name: string;
3
- value: string;
4
- exdays: number;
5
- path?: string;
6
- domain?: string;
7
- }
8
- declare class CookieClass {
9
- /**
10
- * 获取cookie
11
- * @param {String} name
12
- * @return {String}
13
- */
14
- getCookie(name: string): string;
15
- /**
16
- * 设置cookie
17
- * @param {Object} ICookie
18
- */
19
- setCookie({ name, value, exdays, path, domain, }: ICookie): void;
20
- /**
21
- * 清除Cookie
22
- * @param {String} name
23
- */
24
- clearCookie(name: string): void;
25
- }
26
- declare const _default: CookieClass;
27
- export default _default;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- declare const dateClass: any;
2
- declare const numberClass: any;
3
- declare const toolsClass: any;
4
- declare class FilterClass {
5
- /**
6
- * 格式化时间,示例:1586840260500 | format('YYYY-MM-DD HH:mm:ss')
7
- * @param {String|Number} date
8
- * @param {String} fmt 'YYYY-MM-DD HH:mm:ss'
9
- * @return {String} 'YYYY-MM-DD HH:mm:ss'
10
- */
11
- format(date: string | number, fmt?: string): any;
12
- /**
13
- * 格式化金额,示例:123456 | formatMoney
14
- * @param {Number} num
15
- * @return {String} 123,456
16
- */
17
- formatMoney(money: number | string): string;
18
- /**
19
- * 截取数组或字符串,示例:'1234' | slice(3)
20
- * @param {Array|String} target 数组或字符串
21
- * @param {Number} length 截取长度,从0开始
22
- * @return {any}
23
- */
24
- slice(target?: Array<any> | string, length?: number): any;
25
- install(app: any): void;
26
- }
@@ -1,13 +0,0 @@
1
- interface Obj {
2
- [prop: string]: any;
3
- }
4
- declare class Format {
5
- /**
6
- * @desc 对于对象非数字与布尔值的value,当其为falsy时,转换成separator
7
- * @param {object} obj 传入的对象
8
- * @param {string} separator 替换后的值
9
- * transformObjectNullVal({ a: null, b: 0}, '23') // {a: "23", b: 0}
10
- * @return {object}
11
- */
12
- transformObjectNullVal<T extends Obj>(obj: T, separator?: string): T;
13
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,39 +0,0 @@
1
- declare class NumberClass {
2
- /**
3
- * 个位数前面补0
4
- * @param {Number} num 需要格式化的数字
5
- * @return {String} '01'
6
- */
7
- formatNumber(num: number): string;
8
- /**
9
- * 将手机号中间部分替换为星号
10
- * @param {String} phone 手机号码
11
- * @return {String} 131****1111
12
- */
13
- formatPhone(phone: string): string;
14
- /**
15
- * 格式化数字 万
16
- * @param {Number} num
17
- * @return {String} 12.3万
18
- */
19
- convertToWan(num: number): string | number;
20
- /**
21
- * 格式化数字 k
22
- * @param {Number} num
23
- * @return {String} 1.2k
24
- */
25
- convertToThousand(num: number): string | number;
26
- /**
27
- * 随机数,指定范围
28
- * @param {Number} min 开始
29
- * @param {Number} max 结束
30
- * @return {Number|Object}
31
- */
32
- random(min: number, max: number): number | null;
33
- /**
34
- * 格式化金额
35
- * @param {Number} num
36
- * @return {String} 123,456
37
- */
38
- formatMoney(money: number | string, signal: string): string;
39
- }
@@ -1,15 +0,0 @@
1
- declare class Report {
2
- static instance: any;
3
- constructor(Vue: Object, options?: {});
4
- [key: string]: any;
5
- static getInstance(Vue: Object, Option: Object): any;
6
- install(): void;
7
- /**
8
- * 主动上报
9
- * @param {String} data
10
- * @param {String} type 'info','warning','error'
11
- * @param {Object} options
12
- */
13
- log(data?: any, type?: any, options?: any): void;
14
- }
15
- export default Report;
@@ -1 +0,0 @@
1
- export {};