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.
Files changed (49) hide show
  1. package/README.md +7 -0
  2. package/dist/static/iconfont/iconfont.css +7 -3
  3. package/dist/static/iconfont/iconfont.ttf +0 -0
  4. package/dist/static/iconfont/iconfont.woff +0 -0
  5. package/dist/static/iconfont/iconfont.woff2 +0 -0
  6. package/dist/style.css +1 -1
  7. package/dist/types/components/filePreview/types/filePreviewType.d.ts +216 -0
  8. package/dist/types/components/verificationCode/index.d.ts +5 -0
  9. package/dist/types/components/verificationCode/types/configOptionView.d.ts +57 -0
  10. package/dist/types/hooks/useUtils.d.ts +6 -0
  11. package/dist/types/index.d.ts +2 -2
  12. package/dist/types/src/components/dynamicForm/components/advanced/index.d.ts +4 -0
  13. package/dist/types/src/components/dynamicForm/components/application/index.d.ts +5 -0
  14. package/dist/types/src/components/dynamicForm/components/base/index.d.ts +9 -0
  15. package/dist/types/src/components/dynamicForm/components/componentType.d.ts +5 -0
  16. package/dist/types/src/components/dynamicForm/components/layout/index.d.ts +4 -0
  17. package/dist/types/src/components/dynamicForm/index.d.ts +7 -0
  18. package/dist/types/src/components/dynamicForm/types/abnormalCheckView.d.ts +19 -0
  19. package/dist/types/src/components/dynamicForm/types/componentAttribute/advanced/uploadAttribute.d.ts +25 -0
  20. package/dist/types/src/components/dynamicForm/types/componentAttribute/application/employeeAttribute.d.ts +33 -0
  21. package/dist/types/src/components/dynamicForm/types/componentAttribute/application/gradeAttribute.d.ts +45 -0
  22. package/dist/types/src/components/dynamicForm/types/componentAttribute/application/postAttribute.d.ts +33 -0
  23. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/checkboxAttribute.d.ts +29 -0
  24. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/datetimeAttribute.d.ts +54 -0
  25. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/inputAttribute.d.ts +21 -0
  26. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/inputNumberAttribute.d.ts +28 -0
  27. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/radioAttribute.d.ts +21 -0
  28. package/dist/types/src/components/dynamicForm/types/componentAttribute/baseAttribute.d.ts +101 -0
  29. package/dist/types/src/components/dynamicForm/types/componentAttribute/editAttribute.d.ts +61 -0
  30. package/dist/types/src/components/dynamicForm/types/componentAttribute/index.d.ts +15 -0
  31. package/dist/types/src/components/dynamicForm/types/componentAttribute/layout/groupLayoutAttribute.d.ts +29 -0
  32. package/dist/types/src/components/dynamicForm/types/componentAttribute/layout/tabsLayoutAttribute.d.ts +21 -0
  33. package/dist/types/src/components/dynamicForm/types/documentView.d.ts +101 -0
  34. package/dist/types/src/components/dynamicForm/types/enum.d.ts +135 -0
  35. package/dist/types/src/components/dynamicForm/types/formAttribute.d.ts +84 -0
  36. package/dist/types/src/components/dynamicForm/types/relevanceConditionView.d.ts +22 -0
  37. package/dist/types/src/components/dynamicForm/types/uploadOption.d.ts +23 -0
  38. package/dist/types/src/components/filePreview/index.d.ts +5 -0
  39. package/dist/types/src/components/filePreview/types/filePreviewType.d.ts +18 -0
  40. package/dist/types/src/components/puzzleVCode/index.d.ts +5 -0
  41. package/dist/types/src/components/puzzleVCode/types/configOptionView.d.ts +53 -0
  42. package/dist/types/src/hooks/useDate.d.ts +132 -0
  43. package/dist/types/src/hooks/useMessage.d.ts +16 -0
  44. package/dist/types/src/hooks/useToast.d.ts +10 -0
  45. package/dist/types/src/hooks/useUtils.d.ts +58 -0
  46. package/dist/types/src/index.d.ts +790 -0
  47. package/dist/zhytech-ui-mobile.es.js +16856 -309
  48. package/dist/zhytech-ui-mobile.umd.js +2 -2
  49. package/package.json +3 -2
@@ -0,0 +1,101 @@
1
+ /**
2
+ * @description: 组件基本属性类型
3
+ */
4
+ export interface baseAttribute {
5
+ /**
6
+ * 是否显示标题
7
+ */
8
+ showLabel: boolean;
9
+ /**
10
+ * 标题宽度
11
+ */
12
+ labelWidth?: number;
13
+ /**
14
+ * 标题
15
+ */
16
+ label: string;
17
+ /**
18
+ * 字体大小
19
+ */
20
+ fontSize: number;
21
+ /**
22
+ * 是否加粗
23
+ */
24
+ isBold: boolean;
25
+ /**
26
+ * 文字颜色
27
+ */
28
+ color: string;
29
+ /**
30
+ * 宽度
31
+ */
32
+ width: number;
33
+ /**
34
+ * 高度
35
+ */
36
+ height?: number;
37
+ /**
38
+ * 高度单位
39
+ */
40
+ heightUnit?: string;
41
+ /**
42
+ * 标题换行
43
+ */
44
+ labelNewLine: boolean;
45
+ /**
46
+ * 是否显示
47
+ */
48
+ showFlag: boolean;
49
+ /**
50
+ * 显示条件
51
+ */
52
+ showConditions?: Record<string, any>[];
53
+ /**
54
+ * 显示条件描述
55
+ */
56
+ showConditionContent?: string;
57
+ /**
58
+ * 显示条件表达式
59
+ */
60
+ showConditionExpression?: string;
61
+ /**
62
+ * 隐藏条件
63
+ */
64
+ hiddenConditions?: Record<string, any>[];
65
+ /**
66
+ * 隐藏条件描述
67
+ */
68
+ hiddenConditionContent?: string;
69
+ /**
70
+ * 隐藏条件表达式
71
+ */
72
+ hiddenConditionExpression?: string;
73
+ /**
74
+ * 左缩进
75
+ */
76
+ paddingLeft?: number;
77
+ /**
78
+ * 项目说明/答案解析
79
+ */
80
+ description?: string;
81
+ /**
82
+ * 所属tabs组件的页签ID
83
+ */
84
+ pageID?: string;
85
+ /**
86
+ * 所属tabs组件的页签ID
87
+ */
88
+ componentWidth?: number;
89
+ /**
90
+ * 获取数据接口
91
+ */
92
+ fetchDataInterface?: string;
93
+ /**
94
+ * 获取远端数据接口参数
95
+ */
96
+ dataInterfaceParameter?: Record<string, any>[];
97
+ /**
98
+ * 远端数据属性映射
99
+ */
100
+ dataAttributeMapping?: Record<string, string>;
101
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @description: 编辑类组件属性
3
+ */
4
+ export interface editAttribute {
5
+ /**
6
+ * 输入框占位符
7
+ */
8
+ placeholder?: string;
9
+ /**
10
+ * 是否可清空
11
+ */
12
+ clearable?: boolean;
13
+ /**
14
+ * 必填
15
+ */
16
+ required?: boolean;
17
+ /**
18
+ * 必填提示信息
19
+ */
20
+ requiredMessage?: string;
21
+ /**
22
+ * 是否禁用
23
+ */
24
+ disabled?: boolean;
25
+ /**
26
+ * 禁用条件
27
+ */
28
+ disabledConditions?: Record<string, any>[];
29
+ /**
30
+ * 禁用条件描述
31
+ */
32
+ disabledConditionContent?: string;
33
+ /**
34
+ * 禁用条件表达式
35
+ */
36
+ disabledConditionExpression?: string;
37
+ /**
38
+ * 是否只读
39
+ */
40
+ readonly?: boolean;
41
+ /**
42
+ * 只读条件
43
+ */
44
+ readonlyConditions?: Record<string, any>[];
45
+ /**
46
+ * 只读条件描述
47
+ */
48
+ readonlyConditionContent?: string;
49
+ /**
50
+ * 只读条件表达式
51
+ */
52
+ readonlyConditionExpression?: string;
53
+ /**
54
+ * 默认值
55
+ */
56
+ defaultValue?: any;
57
+ /**
58
+ * 是否参与统计
59
+ */
60
+ statisticsFlag: boolean;
61
+ }
@@ -0,0 +1,15 @@
1
+ import { baseAttribute } from './baseAttribute';
2
+ import { editAttribute } from './editAttribute';
3
+ import { checkboxAttribute } from './base/checkboxAttribute';
4
+ import { inputAttribute } from './base/inputAttribute';
5
+ import { radioAttribute } from './base/radioAttribute';
6
+ import { datetimeAttribute } from './base/datetimeAttribute';
7
+ import { inputNumberAttribute } from './base/inputNumberAttribute';
8
+ import { uploadAttribute } from './advanced/uploadAttribute';
9
+ import { employeeAttribute } from './application/employeeAttribute';
10
+ import { postAttribute } from './application/postAttribute';
11
+ import { gradeAttribute } from './application/gradeAttribute';
12
+ import { groupLayoutAttribute } from './layout/groupLayoutAttribute';
13
+ import { tabsLayoutAttribute } from './layout/tabsLayoutAttribute';
14
+
15
+ export type { baseAttribute, editAttribute, checkboxAttribute, datetimeAttribute, inputAttribute, radioAttribute, inputNumberAttribute, employeeAttribute, postAttribute, gradeAttribute, uploadAttribute, groupLayoutAttribute, tabsLayoutAttribute };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @description: 分组面板(groupLayout)组件属性
3
+ */
4
+ export interface groupLayoutAttribute {
5
+ /**
6
+ * 背景色
7
+ */
8
+ backgroundColor?: string;
9
+ /**
10
+ * 是否显示边框
11
+ */
12
+ showBorder: boolean;
13
+ /**
14
+ * 边框样式
15
+ */
16
+ borderStyle?: string;
17
+ /**
18
+ * 边框颜色
19
+ */
20
+ borderWidth: number;
21
+ /**
22
+ * 边框颜色
23
+ */
24
+ borderColor?: string;
25
+ /**
26
+ * 边框圆角大小,0为直角
27
+ */
28
+ borderRadius: number;
29
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @description: 标签页(tabsLayout)组件属性
3
+ */
4
+ export interface tabsLayoutAttribute {
5
+ /**
6
+ * 标签类型
7
+ */
8
+ tabType: "" | "card" | "border-card";
9
+ /**
10
+ * 标签集合
11
+ */
12
+ pages: Record<string, any>[];
13
+ /**
14
+ * 标签位置
15
+ */
16
+ tabPosition: "top" | "right" | "bottom" | "left";
17
+ /**
18
+ * 是否显示导航按钮
19
+ */
20
+ showNavigation?: boolean;
21
+ }
@@ -0,0 +1,101 @@
1
+ /**
2
+ * @description: 文档管理中文件上传参数类型
3
+ */
4
+ export interface documentView {
5
+ /**
6
+ * 文档主内容
7
+ */
8
+ documentMain: DocumentMainView;
9
+ /**
10
+ * 文档明细属性数据集合
11
+ */
12
+ documentDetails: DocumentDetailView[];
13
+ /**
14
+ * 文档标签集合
15
+ */
16
+ documentTags: DocumentTagView[];
17
+ }
18
+ /**
19
+ * @description: 文档主内容
20
+ */
21
+ declare interface DocumentMainView {
22
+ /**
23
+ * 来源系统
24
+ */
25
+ sourceSystem: string;
26
+ /**
27
+ * 文档类型序号
28
+ */
29
+ documentTypeID: number;
30
+ /**
31
+ * 上传人员
32
+ */
33
+ userID: string;
34
+ /**
35
+ * 上传人员
36
+ */
37
+ userName: string;
38
+ /**
39
+ * 文档标题
40
+ */
41
+ documentTitle: string;
42
+ /**
43
+ * 文档封面图片地址
44
+ */
45
+ documentCover?: string;
46
+ /**
47
+ * 文档摘要
48
+ */
49
+ documentAbstract?: string;
50
+ /**
51
+ * 文件扩展名
52
+ */
53
+ fileExtensionName: string;
54
+ }
55
+ /**
56
+ * @description: 文档明细属性数据
57
+ */
58
+ declare interface DocumentDetailView {
59
+ /**
60
+ * 明细组号
61
+ */
62
+ groupID?: number;
63
+ /**
64
+ * 明细序号
65
+ */
66
+ itemID: number;
67
+ /**
68
+ * 明细值
69
+ */
70
+ value: string;
71
+ }
72
+ /**
73
+ * @description: 文档标签
74
+ */
75
+ declare interface DocumentTagView {
76
+ /**
77
+ * 文档标签序号
78
+ */
79
+ documentTagListID?: number;
80
+ /**
81
+ * 标签类型
82
+ */
83
+ tagType?: string;
84
+ /**
85
+ * 标签内容
86
+ */
87
+ tagContent?: string;
88
+ /**
89
+ * 标签说明
90
+ */
91
+ tagDescription?: string;
92
+ /**
93
+ * 标签颜色
94
+ */
95
+ tagColor?: string;
96
+ /**
97
+ * 自定义标记
98
+ */
99
+ customFlag?: boolean;
100
+ }
101
+ export {};
@@ -0,0 +1,135 @@
1
+ /**
2
+ * 表单类型
3
+ */
4
+ export declare enum formTypeEnum {
5
+ /**
6
+ * 问卷
7
+ */
8
+ Form = "1",
9
+ /**
10
+ * 试卷
11
+ */
12
+ Examination = "2"
13
+ }
14
+ /**
15
+ * 试卷答案状态
16
+ */
17
+ export declare enum examinationStatusEnum {
18
+ /**
19
+ * 未作答
20
+ */
21
+ NotAnswered = 1,
22
+ /**
23
+ * 正确
24
+ */
25
+ Correct = 2,
26
+ /**
27
+ * 错误
28
+ */
29
+ Error = 3,
30
+ /**
31
+ * 已作答
32
+ */
33
+ Answered = 4
34
+ }
35
+ /**
36
+ * 组件类型
37
+ */
38
+ export declare enum componentTypeEnum {
39
+ /**
40
+ * 标签
41
+ */
42
+ LABEL = "label",
43
+ /**
44
+ * 输入框
45
+ */
46
+ INPUT = "input",
47
+ /**
48
+ * 复选框
49
+ */
50
+ CHECKBOX = "checkbox",
51
+ /**
52
+ * 单选框
53
+ */
54
+ RADIO = "radio",
55
+ /**
56
+ * 数字输入框
57
+ */
58
+ INPUT_NUMBER = "inputNumber",
59
+ /**
60
+ * 日期选择器
61
+ */
62
+ DATE = "date",
63
+ /**
64
+ * 时间选择器
65
+ */
66
+ TIME = "time",
67
+ /**
68
+ * 上传组件
69
+ */
70
+ UPLOAD = "upload",
71
+ /**
72
+ * 图片上传组件
73
+ */
74
+ UPLOAD_IMAGE = "uploadImage",
75
+ /**
76
+ * 评分组件
77
+ */
78
+ GRADE = "grade",
79
+ /**
80
+ * 人员组件
81
+ */
82
+ EMPLOYEE = "employee",
83
+ /**
84
+ * 岗位组件
85
+ */
86
+ POST = "post",
87
+ GROUP_LAYOUT = "groupLayout",
88
+ /**
89
+ * 页签
90
+ */
91
+ TABS = "tabs"
92
+ }
93
+ /**
94
+ * @description: 异常值检核类型
95
+ */
96
+ export declare enum abnormalCheckType {
97
+ /**
98
+ * 上限
99
+ */
100
+ upperLimit = "\u4E0A\u9650\u503C",
101
+ /**
102
+ * 下限
103
+ */
104
+ lowerLimit = "\u4E0B\u9650\u503C",
105
+ /**
106
+ * 小数位数
107
+ */
108
+ decimalPlace = "\u5C0F\u6570\u4F4D"
109
+ }
110
+ /**
111
+ * @description: 异常值检核级别类型
112
+ */
113
+ export declare enum checkLevelType {
114
+ /**
115
+ * 错误
116
+ */
117
+ error = "\u9519\u8BEF",
118
+ /**
119
+ * 警告
120
+ */
121
+ warning = "\u8B66\u544A"
122
+ }
123
+ /**
124
+ * @description: 关联类型
125
+ */
126
+ export declare enum relevanceType {
127
+ /**
128
+ * 自动选择
129
+ */
130
+ autoSelect = "\u81EA\u52A8\u9009\u62E9",
131
+ /**
132
+ * 自动取消
133
+ */
134
+ autoCancel = "\u81EA\u52A8\u53D6\u6D88"
135
+ }
@@ -0,0 +1,84 @@
1
+ /**
2
+ * @description: 动态表单属性类型
3
+ */
4
+ export interface formAttribute {
5
+ /**
6
+ * 表单ID
7
+ */
8
+ formID?: string;
9
+ /**
10
+ * 表单名称
11
+ */
12
+ formName: string;
13
+ /**
14
+ * 表单类型 1:问卷表单;2:试卷表单
15
+ */
16
+ formType: string;
17
+ /**
18
+ * 标题位置
19
+ */
20
+ labelPosition: string;
21
+ /**
22
+ * 标题宽度
23
+ */
24
+ labelWidth: number;
25
+ /**
26
+ * 大小
27
+ */
28
+ size: string;
29
+ /**
30
+ * 栅格数量
31
+ */
32
+ column: number;
33
+ }
34
+ /**
35
+ * @description: 动态表单数据参数类型
36
+ */
37
+ export interface dynamicFormData<T extends formAttribute | Record<string, any>> {
38
+ /**
39
+ * 表单属性
40
+ */
41
+ props: T;
42
+ /**
43
+ * 表单中组件集合
44
+ */
45
+ components: Record<string, any>[];
46
+ /**
47
+ * 表单数据
48
+ */
49
+ datas: Record<string, any>;
50
+ }
51
+ /**
52
+ * @description: 动态表单字典表参数类型
53
+ */
54
+ export interface dictionaryItem {
55
+ /**
56
+ * 字典项目ID
57
+ */
58
+ value: string;
59
+ /**
60
+ * 字典项目名称
61
+ */
62
+ label: string;
63
+ /**
64
+ * 字典项目来源
65
+ */
66
+ itemSourceType?: string;
67
+ /**
68
+ * 字典项目来源
69
+ */
70
+ itemSourceTypeName?: string;
71
+ }
72
+ /**
73
+ * @description: 动态表单字典表参数类型
74
+ */
75
+ export interface dictionaryData {
76
+ /**
77
+ * 字典项目集合
78
+ */
79
+ dictionaryItems: dictionaryItem[];
80
+ /**
81
+ * 字典项目来源映射map
82
+ */
83
+ sourceTypeMap: Map<string, string>;
84
+ }
@@ -0,0 +1,22 @@
1
+ import { relevanceType } from './enum';
2
+
3
+ type relevance = keyof typeof relevanceType;
4
+ export interface relevanceConditionView {
5
+ /**
6
+ * 类型
7
+ */
8
+ type: relevance;
9
+ /**
10
+ * 上限值
11
+ */
12
+ upperLimit: number;
13
+ /**
14
+ * 下限值
15
+ */
16
+ lowerLimit: number;
17
+ /**
18
+ * 目标项目序号
19
+ */
20
+ targetItemID: string;
21
+ }
22
+ export {};
@@ -0,0 +1,23 @@
1
+ import { documentView } from './documentView';
2
+
3
+ /**
4
+ * @description: 上传文件参数
5
+ */
6
+ export interface uploadOption {
7
+ /**
8
+ * 上传文件api接口
9
+ */
10
+ serverApi: string;
11
+ /**
12
+ * 上传文件的请求头部
13
+ */
14
+ headers?: Record<string, any>;
15
+ /**
16
+ * 是否自动上传
17
+ */
18
+ autoUpload: boolean;
19
+ /**
20
+ * 上传文件时附加参数,如果autoUpload=true,必须传此参数
21
+ */
22
+ params?: documentView;
23
+ }
@@ -0,0 +1,5 @@
1
+ import { default as filePreview } from './index';
2
+ import { filePreviewOption } from './types/filePreviewType';
3
+
4
+ export { filePreview };
5
+ export type { filePreviewOption };
@@ -0,0 +1,18 @@
1
+ export interface filePreviewOption {
2
+ /**
3
+ * @description: 是否显示控制按钮
4
+ */
5
+ showCtrolBtn: boolean;
6
+ /**
7
+ * @description: 是否显示缩放按钮
8
+ */
9
+ showScaleBtn: boolean;
10
+ /**
11
+ * @description: 是否显示下载按钮
12
+ */
13
+ showDownLoadBtn: boolean;
14
+ /**
15
+ * @description: 是否显示全屏按钮
16
+ */
17
+ showFullScreenBtn: boolean;
18
+ }
@@ -0,0 +1,5 @@
1
+ import { default as puzzleVcode } from './index';
2
+ import { configOptionView as vcodeConfigOption } from './types/configOptionView';
3
+
4
+ export { puzzleVcode };
5
+ export type { vcodeConfigOption };
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @description: 配置选项类型
3
+ */
4
+ export interface configOptionView {
5
+ /**
6
+ * 显示类型,"modal"模态框形式 / "inside"内嵌形式
7
+ */
8
+ type?: "modal" | "inside";
9
+ /**
10
+ * 自定义样式类名
11
+ */
12
+ className?: string;
13
+ /**
14
+ * 验证码宽度,单位px,默认400px
15
+ */
16
+ canvasWidth?: number;
17
+ /**
18
+ * 验证码高度,单位px,默认220px
19
+ */
20
+ canvasHeight?: number;
21
+ /**
22
+ * 拼图块(小的拼图)的大小比例,0.2 ~ 2 ,数字越大,拼图越大
23
+ */
24
+ puzzleScale?: number;
25
+ /**
26
+ * 判断成功的误差范围,单位 px, 滑动的距离和拼图的距离小于等于此值时,会判定重合,默认10px
27
+ */
28
+ range?: number;
29
+ /**
30
+ * 自定义图片集合
31
+ */
32
+ imgs?: string[];
33
+ /**
34
+ * 验证成功时的提示文字,默认:验证通过
35
+ */
36
+ successText?: string;
37
+ /**
38
+ * 验证失败时的提示文字,默认:验证失败,请重试
39
+ */
40
+ failText?: string;
41
+ /**
42
+ * 左下角用户拖动的那个滑块的尺寸,单位 px,默认 40px
43
+ */
44
+ sliderSize?: number;
45
+ /**
46
+ * 下方滑动条里的文字,默认:拖动滑块完成拼图
47
+ */
48
+ sliderText?: string;
49
+ /**
50
+ * 验证成功的回调函数
51
+ */
52
+ onSuccess?: Function;
53
+ }