zhytech-ui-mobile 1.0.18 → 1.1.0
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.
- package/README.md +7 -0
- package/dist/static/iconfont/iconfont.css +7 -3
- package/dist/static/iconfont/iconfont.ttf +0 -0
- package/dist/static/iconfont/iconfont.woff +0 -0
- package/dist/static/iconfont/iconfont.woff2 +0 -0
- package/dist/style.css +1 -1
- package/dist/types/components/filePreview/types/filePreviewType.d.ts +216 -0
- package/dist/types/components/verificationCode/index.d.ts +5 -0
- package/dist/types/components/verificationCode/types/configOptionView.d.ts +57 -0
- package/dist/types/hooks/useUtils.d.ts +6 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/src/components/dynamicForm/components/advanced/index.d.ts +4 -0
- package/dist/types/src/components/dynamicForm/components/application/index.d.ts +5 -0
- package/dist/types/src/components/dynamicForm/components/base/index.d.ts +9 -0
- package/dist/types/src/components/dynamicForm/components/componentType.d.ts +5 -0
- package/dist/types/src/components/dynamicForm/components/layout/index.d.ts +4 -0
- package/dist/types/src/components/dynamicForm/index.d.ts +7 -0
- package/dist/types/src/components/dynamicForm/types/abnormalCheckView.d.ts +19 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/advanced/uploadAttribute.d.ts +25 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/application/employeeAttribute.d.ts +33 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/application/gradeAttribute.d.ts +45 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/application/postAttribute.d.ts +33 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/base/checkboxAttribute.d.ts +29 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/base/datetimeAttribute.d.ts +54 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/base/inputAttribute.d.ts +21 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/base/inputNumberAttribute.d.ts +28 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/base/radioAttribute.d.ts +21 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/baseAttribute.d.ts +101 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/editAttribute.d.ts +61 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/index.d.ts +15 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/layout/groupLayoutAttribute.d.ts +29 -0
- package/dist/types/src/components/dynamicForm/types/componentAttribute/layout/tabsLayoutAttribute.d.ts +21 -0
- package/dist/types/src/components/dynamicForm/types/documentView.d.ts +101 -0
- package/dist/types/src/components/dynamicForm/types/enum.d.ts +135 -0
- package/dist/types/src/components/dynamicForm/types/formAttribute.d.ts +84 -0
- package/dist/types/src/components/dynamicForm/types/relevanceConditionView.d.ts +22 -0
- package/dist/types/src/components/dynamicForm/types/uploadOption.d.ts +23 -0
- package/dist/types/src/components/filePreview/index.d.ts +5 -0
- package/dist/types/src/components/filePreview/types/filePreviewType.d.ts +18 -0
- package/dist/types/src/components/puzzleVCode/index.d.ts +5 -0
- package/dist/types/src/components/puzzleVCode/types/configOptionView.d.ts +53 -0
- package/dist/types/src/hooks/useDate.d.ts +132 -0
- package/dist/types/src/hooks/useMessage.d.ts +16 -0
- package/dist/types/src/hooks/useToast.d.ts +10 -0
- package/dist/types/src/hooks/useUtils.d.ts +58 -0
- package/dist/types/src/index.d.ts +790 -0
- package/dist/zhytech-ui-mobile.es.js +16856 -309
- package/dist/zhytech-ui-mobile.umd.js +2 -2
- package/package.json +3 -2
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { default as dayjs } from 'dayjs';
|
|
2
|
+
|
|
3
|
+
export default function useDate(): {
|
|
4
|
+
/**
|
|
5
|
+
* 校检日期格式是否为YYYY-MM-DD这种格式
|
|
6
|
+
* @param date
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
isValidDate(date: dayjs.ConfigType): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 校检日期格式是否为YYYY-MM-DD HH:mm:ss这种格式
|
|
12
|
+
* @param date
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
isValidDateTime(date: dayjs.ConfigType): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 格式化日期年月日,时间格式为format,默认YYYY-MM-DD
|
|
18
|
+
* @param date
|
|
19
|
+
* @param format
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
formatDate: (date: dayjs.ConfigType, format?: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* 获取当前日期年月日,时间格式为YYYY-MM-DD
|
|
25
|
+
* @param format
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
getCurrentDate(format?: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* 获取当前日期年月日时分秒,时间格式为YYYY-MM-DD HH:mm:ss(24小时制,如果hh为小写表示为12小时制)
|
|
31
|
+
* @param format
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
getCurrentDateTime(format?: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* 获取日期的毫秒数
|
|
37
|
+
* @param date
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
getMilliseconds(date?: dayjs.ConfigType): number;
|
|
41
|
+
/**
|
|
42
|
+
* 获取日期的指定值
|
|
43
|
+
* @param date
|
|
44
|
+
* @param dateType 为要获取日期类型,有如下类型:'minute','hour','day','month','year'这六种类型
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
getTimeByType(dateType: dayjs.ManipulateType, date?: dayjs.ConfigType): any;
|
|
48
|
+
/**
|
|
49
|
+
* 将传过来的日期加X日期且时间格式为YYYY-MM-DD这种格式,如:getXAfterDate('2023-11-11',1,'day'),结果为2023-11-12
|
|
50
|
+
* @param date:为传过来的日期
|
|
51
|
+
* @param num:在当前日期加num,类型为int
|
|
52
|
+
* @param dateType:为要加的日期类型,有如下类型:'minute','hour','day','week','month','year'这六种类型
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
getXAfterDate: (date: dayjs.ConfigType, num: number, dateType: dayjs.ManipulateType) => string;
|
|
56
|
+
/**
|
|
57
|
+
* 将传过来的日期加X日期且时间格式为YYYY-MM-DD HH:mm:ss这种格式,如:getXAfterDateTime('2023-11-11 10:23:45',1,'day'),结果为2023-11-12 10:23:45
|
|
58
|
+
* @param date:为传过来的日期
|
|
59
|
+
* @param num:在当前日期加num,类型为int
|
|
60
|
+
* @param dateType:为要加的日期类型,有如下类型:'minute','hour','day','week','month','year'这六种类型
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
getXAfterDateTime(date: dayjs.ConfigType, num: number, dateType: dayjs.ManipulateType): string;
|
|
64
|
+
/**
|
|
65
|
+
* 将传过来的日期减去X日期且时间格式为YYYY-MM-DD这种格式,如:getXBeforeDate('2023-11-11',1,'day'),结果为2023-11-10
|
|
66
|
+
* @param date:为传过来的日期
|
|
67
|
+
* @param num:在当前日期加num,类型为int
|
|
68
|
+
* @param dateType:为要加的日期类型,有如下类型:'minute','hour','day','week','month','year'这六种类型
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
getXBeforeDate(date: dayjs.ConfigType, num: number, dateType: dayjs.ManipulateType): string;
|
|
72
|
+
/**
|
|
73
|
+
* 将传过来的日期减去X日期且时间格式为YYYY-MM-DD HH:mm:ss这种格式,如:getXBeforeDateTime('2023-11-11 10:23:45',1,'day'),结果为2023-11-10 10:23:45
|
|
74
|
+
* @param date:为传过来的日期
|
|
75
|
+
* @param num:在当前日期加day,类型为int
|
|
76
|
+
* @param dateType:为要加的日期类型,有如下类型:'minute','hour','day','week','month','year'这六种类型
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
getXBeforeDateTime(date: dayjs.ConfigType, num: number, dateType: dayjs.ManipulateType): string;
|
|
80
|
+
/**
|
|
81
|
+
* 计算2个日期之间的差值
|
|
82
|
+
* @param startDate:开始日期
|
|
83
|
+
* @param endDate:结束日期,结束日期要比开始日期大
|
|
84
|
+
* @param dateType:日期类型,有如下类型:'minute','hour','day','week','month','year'这六种类型
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
87
|
+
getDateDiff(startDate: dayjs.ConfigType, endDate: dayjs.ConfigType, dateType: dayjs.ManipulateType): number;
|
|
88
|
+
/**
|
|
89
|
+
* 判断date1是否在date2之前,比如:date1:2023-01-01 13:30:23,date2:2022-12-01 13:30:23,结果为false
|
|
90
|
+
* @param date1
|
|
91
|
+
* @param date2
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
isBefore: (date1: dayjs.ConfigType, date2: dayjs.ConfigType) => boolean;
|
|
95
|
+
/**
|
|
96
|
+
* 判断date1是否在date2之后,比如:date1:2023-01-01 13:30:23,date2:2022-12-01 13:30:23,结果为true
|
|
97
|
+
* @param date1
|
|
98
|
+
* @param date2
|
|
99
|
+
* @returns
|
|
100
|
+
*/
|
|
101
|
+
isAfter(date1: dayjs.ConfigType, date2: dayjs.ConfigType): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* 判断date1是否与date2相同,比如:date1:2023-01-01 13:30:23,date2:2022-12-01 13:30:23,结果为false
|
|
104
|
+
* @param date1
|
|
105
|
+
* @param date2
|
|
106
|
+
* @returns
|
|
107
|
+
*/
|
|
108
|
+
isSame(date1: dayjs.ConfigType, date2: dayjs.ConfigType): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* 将传过来的日期转为当年的1月1号或者当月的1号或者当周的周一
|
|
111
|
+
* @param date:传过来日期
|
|
112
|
+
* @param dateType,日期类型,为:year,month,week这3种
|
|
113
|
+
* @returns
|
|
114
|
+
*/
|
|
115
|
+
getEarlyDaysDate(date: dayjs.ConfigType, dateType: dayjs.ManipulateType): string;
|
|
116
|
+
/**
|
|
117
|
+
* 将传过来的日期转为当年的12月31号或者当月的最后一天或者当周的周日
|
|
118
|
+
* @param date:传过来日期
|
|
119
|
+
* @param dateType,日期类型,为:year,month,week这3种
|
|
120
|
+
* @returns
|
|
121
|
+
*/
|
|
122
|
+
getLastDaysDate(date: dayjs.ConfigType, dateType: dayjs.ManipulateType): string;
|
|
123
|
+
/**
|
|
124
|
+
* 获取2个日期之间的所有日期,包括开始日期和结束日期,如:getIntermediateDate('2023-12-01','2023-12-15',1,'day'))
|
|
125
|
+
* @param startDate:开始日期
|
|
126
|
+
* @param endDate:结束日期要大于开始日期
|
|
127
|
+
* @param num:在开始日期上加num,int类型,如果dateType为day,num为1那么就是在开始日期上加一天
|
|
128
|
+
* @param dateType,日期类型,类型如下:'minute','hour','day','week','month','year'这六种类型
|
|
129
|
+
* @returns
|
|
130
|
+
*/
|
|
131
|
+
getIntermediateDate(startDate: dayjs.ConfigType, endDate: dayjs.ConfigType, num: number, dateType: dayjs.ManipulateType): (string | number | Date | dayjs.Dayjs)[];
|
|
132
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function useMessage(): {
|
|
2
|
+
/**
|
|
3
|
+
* @description: 显示提示信息
|
|
4
|
+
* @param messageContent 消息内容
|
|
5
|
+
* @return
|
|
6
|
+
*/
|
|
7
|
+
alert(messageContent: string): void;
|
|
8
|
+
/**
|
|
9
|
+
* @description: 显示确认信息
|
|
10
|
+
* @param messageContent 消息内容
|
|
11
|
+
* @param title 标题
|
|
12
|
+
* @param callback 回调方法
|
|
13
|
+
* @return
|
|
14
|
+
*/
|
|
15
|
+
confirm(messageContent: string, title: string, callback?: Function): void;
|
|
16
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function useToast(): {
|
|
2
|
+
/**
|
|
3
|
+
* @description: 显示提示信息
|
|
4
|
+
* @param type 信息类型,可选值:success、error、warning、info
|
|
5
|
+
* @param messageContent 消息内容
|
|
6
|
+
* @param position 位置
|
|
7
|
+
* @return
|
|
8
|
+
*/
|
|
9
|
+
showToast(type: string, messageContent: string, position?: string): void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare function useUtils(): {
|
|
2
|
+
/**
|
|
3
|
+
* @description: 判断是否是微信浏览器打开
|
|
4
|
+
* @return
|
|
5
|
+
*/
|
|
6
|
+
isWechatBrowser(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @description: 计算表达式,实现eval函数功能,解决使用eval时编译报错
|
|
9
|
+
* @param expression
|
|
10
|
+
* @return
|
|
11
|
+
*/
|
|
12
|
+
computedExpression: (expression: string) => any;
|
|
13
|
+
/**
|
|
14
|
+
* @description: 判断参数是否为空
|
|
15
|
+
* @param T param
|
|
16
|
+
* @return
|
|
17
|
+
*/
|
|
18
|
+
isEmpty: <T>(param: T) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description: 判断参数是否为空
|
|
21
|
+
* @param T obj
|
|
22
|
+
* @param reserveEmptyArray 是否保留空数组,默认不保留
|
|
23
|
+
* @return
|
|
24
|
+
*/
|
|
25
|
+
removeEmptyAttribute(obj: Object, reserveEmptyArray?: boolean): Object;
|
|
26
|
+
/**
|
|
27
|
+
* 将JavaScript对象转换为FormData对象,以便可以通过HTTP请求发送。
|
|
28
|
+
* @param {Object} objectToConvert - 要转换的JavaScript对象。
|
|
29
|
+
* @param {string} [rootName] - 在生成的FormData对象中,objectToConvert对象的属性的基础名称。
|
|
30
|
+
* @param {FormData} [existingFormData] - 可选的FormData对象,如果提供,将在此对象上添加新的字段。
|
|
31
|
+
* @returns {FormData} - 包含objectToConvert对象属性的FormData对象。
|
|
32
|
+
*/
|
|
33
|
+
convertObjectToFormData: (objectToConvert: any, rootName?: string, existingFormData?: FormData) => FormData;
|
|
34
|
+
/**
|
|
35
|
+
* @description: 检查上传的文件是否合法
|
|
36
|
+
* @param file 要上传的文件
|
|
37
|
+
* @param files 已上传的文件
|
|
38
|
+
* @param size 文件限制大小
|
|
39
|
+
* @param unit 文件限制大小的单位
|
|
40
|
+
* @param isImage 是否为图片
|
|
41
|
+
* @return
|
|
42
|
+
*/
|
|
43
|
+
checkFile(file: any, files: [], size: number, unit: string, isImage: boolean): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* @description: 将数据对象转换为文件对象
|
|
46
|
+
* @param files
|
|
47
|
+
* @return
|
|
48
|
+
*/
|
|
49
|
+
dataToFile(files: Record<string, any>[]): Promise<File[]>;
|
|
50
|
+
/**
|
|
51
|
+
* @description: 将对象格式化为页面跳转参数字符串
|
|
52
|
+
* @param params
|
|
53
|
+
* @param any
|
|
54
|
+
* @return
|
|
55
|
+
*/
|
|
56
|
+
toQueryParams(params: Record<string, any>): string;
|
|
57
|
+
isCurrentProject(): boolean;
|
|
58
|
+
};
|