zhytech-ui-mobile 1.0.19 → 1.1.1

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 +12 -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/{puzzleVCode → verificationCode}/index.d.ts +2 -2
  9. package/dist/types/components/{puzzleVCode → verificationCode}/types/configOptionView.d.ts +15 -11
  10. package/dist/types/hooks/useUtils.d.ts +6 -0
  11. package/dist/types/index.d.ts +2 -2
  12. package/dist/zhytech-ui-mobile.es.js +16811 -482
  13. package/dist/zhytech-ui-mobile.umd.js +2 -2
  14. package/package.json +3 -2
  15. package/dist/types/src/components/dynamicForm/components/advanced/index.d.ts +0 -4
  16. package/dist/types/src/components/dynamicForm/components/application/index.d.ts +0 -5
  17. package/dist/types/src/components/dynamicForm/components/base/index.d.ts +0 -9
  18. package/dist/types/src/components/dynamicForm/components/componentType.d.ts +0 -5
  19. package/dist/types/src/components/dynamicForm/components/layout/index.d.ts +0 -4
  20. package/dist/types/src/components/dynamicForm/index.d.ts +0 -7
  21. package/dist/types/src/components/dynamicForm/types/abnormalCheckView.d.ts +0 -19
  22. package/dist/types/src/components/dynamicForm/types/componentAttribute/advanced/uploadAttribute.d.ts +0 -25
  23. package/dist/types/src/components/dynamicForm/types/componentAttribute/application/employeeAttribute.d.ts +0 -33
  24. package/dist/types/src/components/dynamicForm/types/componentAttribute/application/gradeAttribute.d.ts +0 -45
  25. package/dist/types/src/components/dynamicForm/types/componentAttribute/application/postAttribute.d.ts +0 -33
  26. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/checkboxAttribute.d.ts +0 -29
  27. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/datetimeAttribute.d.ts +0 -54
  28. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/inputAttribute.d.ts +0 -21
  29. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/inputNumberAttribute.d.ts +0 -28
  30. package/dist/types/src/components/dynamicForm/types/componentAttribute/base/radioAttribute.d.ts +0 -21
  31. package/dist/types/src/components/dynamicForm/types/componentAttribute/baseAttribute.d.ts +0 -101
  32. package/dist/types/src/components/dynamicForm/types/componentAttribute/editAttribute.d.ts +0 -61
  33. package/dist/types/src/components/dynamicForm/types/componentAttribute/index.d.ts +0 -15
  34. package/dist/types/src/components/dynamicForm/types/componentAttribute/layout/groupLayoutAttribute.d.ts +0 -29
  35. package/dist/types/src/components/dynamicForm/types/componentAttribute/layout/tabsLayoutAttribute.d.ts +0 -21
  36. package/dist/types/src/components/dynamicForm/types/documentView.d.ts +0 -101
  37. package/dist/types/src/components/dynamicForm/types/enum.d.ts +0 -135
  38. package/dist/types/src/components/dynamicForm/types/formAttribute.d.ts +0 -84
  39. package/dist/types/src/components/dynamicForm/types/relevanceConditionView.d.ts +0 -22
  40. package/dist/types/src/components/dynamicForm/types/uploadOption.d.ts +0 -23
  41. package/dist/types/src/components/filePreview/index.d.ts +0 -5
  42. package/dist/types/src/components/filePreview/types/filePreviewType.d.ts +0 -18
  43. package/dist/types/src/components/puzzleVCode/index.d.ts +0 -5
  44. package/dist/types/src/components/puzzleVCode/types/configOptionView.d.ts +0 -53
  45. package/dist/types/src/hooks/useDate.d.ts +0 -132
  46. package/dist/types/src/hooks/useMessage.d.ts +0 -16
  47. package/dist/types/src/hooks/useToast.d.ts +0 -10
  48. package/dist/types/src/hooks/useUtils.d.ts +0 -58
  49. package/dist/types/src/index.d.ts +0 -790
@@ -1,3 +1,214 @@
1
+ type videoSlotConfig = {
2
+ /**
3
+ * 是否显示视频插槽,默认false
4
+ */
5
+ show?: boolean;
6
+ /**
7
+ * 视频插槽宽度,默认auto
8
+ */
9
+ width?: string;
10
+ /**
11
+ * 视频插槽高度,默认auto
12
+ */
13
+ height?: string;
14
+ };
15
+ type MobileConfig = {
16
+ /**
17
+ * 是否禁用手势,默认值false
18
+ */
19
+ disableGesture?: boolean;
20
+ /**
21
+ * 是否启用水平手势处理,水平手势快进/快退,默认值true
22
+ */
23
+ gestureX?: boolean;
24
+ /**
25
+ * 是否启用垂直手势处理,默认值true, 垂直手势包括屏幕右侧和屏幕左侧,默认左侧调节亮度,右侧调节音量,左右范围比例通过scopeL和scopeR设置
26
+ */
27
+ gestureY?: boolean;
28
+ /**
29
+ * 是否启用上下渐变阴影, 默认值: normal
30
+ */
31
+ gradient?: "normal" | "none" | "top" | "bottom";
32
+ /**
33
+ * 长按快进倍速,默认值: 2
34
+ */
35
+ pressRate?: number;
36
+ /**
37
+ * 是否在touchMove的同时更新播放器的currentTime,默认false, 在手势移动过程中,不会直接调用播放器的快进快退,在toucheEnd的时候再设置
38
+ */
39
+ isTouchingSeek?: boolean;
40
+ /**
41
+ * 是否禁用时间预览面板,默认false
42
+ */
43
+ disableActive?: boolean;
44
+ /**
45
+ * 是否禁用时间进度条,默认false
46
+ */
47
+ disableTimeProgress?: boolean;
48
+ /**
49
+ * 禁用长按倍速调整,默认true
50
+ */
51
+ disablePress?: boolean;
52
+ };
53
+ export type videoConfigType = {
54
+ /**
55
+ * 视频名称,默认空
56
+ */
57
+ title?: string;
58
+ /**
59
+ * 是否禁止快进,默认false
60
+ */
61
+ notAllowedSeek?: boolean;
62
+ /**
63
+ * 视频插槽配置
64
+ */
65
+ videoSlot?: videoSlotConfig;
66
+ /**
67
+ * 移动端专属配置
68
+ */
69
+ mobile?: MobileConfig;
70
+ /**
71
+ * 视频组件实例化完成事件
72
+ */
73
+ onReady?: Function;
74
+ /**
75
+ * 播放器创建video完成,可以开始播放
76
+ */
77
+ onComplete?: Function;
78
+ /**
79
+ * 播放事件,默认空
80
+ */
81
+ onPlay?: Function;
82
+ /**
83
+ * 暂停事件,默认空
84
+ */
85
+ onPause?: Function;
86
+ /**
87
+ * 播放结束事件,默认空
88
+ */
89
+ onEnd?: Function;
90
+ /**
91
+ * 错误事件,默认空
92
+ */
93
+ onError?: Function;
94
+ /**
95
+ * 时间更新事件,默认空
96
+ */
97
+ onTimeupdate?: Function;
98
+ /**
99
+ * 视频类型,默认video
100
+ */
101
+ mediaType?: "video" | "audio";
102
+ /**
103
+ * 视频封面,默认空
104
+ */
105
+ poster?: string;
106
+ /**
107
+ * 自动播放,默认false
108
+ */
109
+ autoPlay?: boolean;
110
+ /**
111
+ * 是否自动静音自动播放,如果autoplay为false,则该属性的作用为默认静音播放
112
+ */
113
+ autoplayMuted?: boolean;
114
+ /**
115
+ * 是否默认初始化video,当autoplay为true时,该配置为false无效
116
+ */
117
+ videoInit?: boolean;
118
+ /**
119
+ * 初始起播时间,仅点播,默认值: 0
120
+ */
121
+ startTime?: number;
122
+ /**
123
+ * seek操作结束之后播放器的状态,如果取值为auto,则维持原播放状态, 默认是seek之后直接播放
124
+ * 默认值: play; play 播放;pause 暂停; auto 保持操作前的状态
125
+ */
126
+ seekedStatus?: "pause" | "play" | "auto" | undefined;
127
+ /**
128
+ * 默认起播倍速,参考值0.5/0.75/1/1.5/2
129
+ */
130
+ defaultPlaybackRate?: number;
131
+ /**
132
+ * 倍速插件显示列表,当该配置为false的时候,相当于禁用倍速切换插件,也可以传入一组配置项
133
+ * 播放倍速,默认值: [0.5, 0.75, 1, 1.5, 2]
134
+ */
135
+ playbackRate?: boolean | Array<number> | {};
136
+ /**
137
+ * 是否开启快捷键,该配置项用于快捷键功能的开关
138
+ */
139
+ keyShortcut?: boolean;
140
+ /**
141
+ * 是否启用流式布局,启用流式布局时根据width、height计算播放器宽高比,若width和height不是Number类型,默认使用16:9比例
142
+ */
143
+ fluid?: boolean;
144
+ /**
145
+ * 播放器容器尺寸适配方式,在视频资源初始化之后,根据获取到的videoWidth和videoHeight的比例对播放器容器宽高进行调整
146
+ * 默认值: fixed
147
+ * fixed 保持容器宽/高,不做适配
148
+ * fixWidth 保持容器宽度,适配高度
149
+ * fixHeight 保持容器高度,适配宽度
150
+ */
151
+ fitVideoSize?: "fixWidth" | "fixHeight" | "fixed" | undefined;
152
+ /**
153
+ * video画面填充模式
154
+ * 默认值: auto
155
+ * fillWidth 填充宽度,高度溢出则裁剪高度
156
+ * fillHeight 填充高度,宽度溢出则裁剪宽度
157
+ * fill 拉伸填充
158
+ * contain 保持宽高比,缩放至一边填满容器,另一边将添加“黑边”
159
+ * auto 默认值,同浏览器默认
160
+ */
161
+ videoFillMode?: "auto" | "fill" | "fillHeight" | "fillWidth" | "cover" | "contain" | undefined;
162
+ /**
163
+ * 是否启用内联播放模式,该配置项只在移动端生效,当设置了该属性为true的时候,将会在初始化video/audio的时候,设置playsinline、webkit-playsinline、x5-playsinline三个属性为true,
164
+ * iOS10以下系统safari不支持playsinline,默认播放即进入系统全屏
165
+ */
166
+ playsInline?: boolean;
167
+ /**
168
+ * 是否循环播放,默认false
169
+ */
170
+ loop?: boolean;
171
+ /**
172
+ * 播放器进度条故事点信息,具体数据结构如下
173
+ * const progressDot = [
174
+ * {
175
+ * id: 0, // 唯一标识,用于删除的时候索引
176
+ * time: 10, // 展示的时间点,例子为在播放到10s钟的时候展示
177
+ * text: 'Demo', // hover的时候展示文案,可以为空
178
+ * duration: 5, // 展示时间跨度,单位为s
179
+ * style: { // 指定样式
180
+ * backgroundColor: 'red'
181
+ * }
182
+ * },
183
+ * ...
184
+ * ]
185
+ */
186
+ progressDot?: Array<Record<string, any>>;
187
+ /**
188
+ * 是否开启画面和控制栏分离模式,设置为false,控制栏将会常驻,与视频画面不重叠
189
+ */
190
+ marginControls?: boolean;
191
+ /**
192
+ * pc端: 是否单击播放器区域切换播放/暂停
193
+ * mobile端: closeVideoDblclick 为是否通关闭video的click/touchend行为切换播放暂停
194
+ * 默认值: false
195
+ */
196
+ closeVideoClick?: boolean;
197
+ /**
198
+ * 视频音量大小,默认1
199
+ */
200
+ volume?: number;
201
+ /**
202
+ * pc端: 是否关闭双击播放器进入全屏的能力
203
+ * mobile端: 是否关闭双击切换暂停/播放的能力
204
+ */
205
+ closeVideoDblclick?: boolean;
206
+ /**
207
+ * 用户鼠标离开播放器区域之后,控制栏隐藏延时时间,如果想要鼠标移出播放器区域就隐藏,则配置为0(只在pc端生效)
208
+ * 单位ms,默认值: 3000
209
+ */
210
+ leavePlayerTime?: number;
211
+ };
1
212
  export interface filePreviewOption {
2
213
  /**
3
214
  * @description: 是否显示控制按钮
@@ -15,4 +226,9 @@ export interface filePreviewOption {
15
226
  * @description: 是否显示全屏按钮
16
227
  */
17
228
  showFullScreenBtn: boolean;
229
+ /**
230
+ * 视频配置
231
+ */
232
+ videoConfig?: videoConfigType;
18
233
  }
234
+ export {};
@@ -1,5 +1,5 @@
1
- import { default as puzzleVcode } from './index';
1
+ import { default as verificationCode } from './index';
2
2
  import { configOptionView as vcodeConfigOption } from './types/configOptionView';
3
3
 
4
- export { puzzleVcode };
4
+ export { verificationCode };
5
5
  export type { vcodeConfigOption };
@@ -3,7 +3,11 @@
3
3
  */
4
4
  export interface configOptionView {
5
5
  /**
6
- * 显示类型,"modal"模态框形式 / "inside"内嵌形式
6
+ * 验证码类型,puzzle:拼图; clickText:点击文字
7
+ */
8
+ verificationType?: "puzzle" | "clickText";
9
+ /**
10
+ * 显示类型,"modal"模态框形式 ; "inside"内嵌形式
7
11
  */
8
12
  type?: "modal" | "inside";
9
13
  /**
@@ -13,19 +17,11 @@ export interface configOptionView {
13
17
  /**
14
18
  * 验证码宽度,单位px,默认400px
15
19
  */
16
- canvasWidth?: number;
20
+ width?: number;
17
21
  /**
18
22
  * 验证码高度,单位px,默认220px
19
23
  */
20
- canvasHeight?: number;
21
- /**
22
- * 拼图块(小的拼图)的大小比例,0.2 ~ 2 ,数字越大,拼图越大
23
- */
24
- puzzleScale?: number;
25
- /**
26
- * 判断成功的误差范围,单位 px, 滑动的距离和拼图的距离小于等于此值时,会判定重合,默认10px
27
- */
28
- range?: number;
24
+ height?: number;
29
25
  /**
30
26
  * 自定义图片集合
31
27
  */
@@ -38,6 +34,14 @@ export interface configOptionView {
38
34
  * 验证失败时的提示文字,默认:验证失败,请重试
39
35
  */
40
36
  failText?: string;
37
+ /**
38
+ * 拼图块(小的拼图)的大小比例,0.2 ~ 2 ,数字越大,拼图越大
39
+ */
40
+ puzzleScale?: number;
41
+ /**
42
+ * 判断成功的误差范围,单位 px, 滑动的距离和拼图的距离小于等于此值时,会判定重合,默认10px
43
+ */
44
+ range?: number;
41
45
  /**
42
46
  * 左下角用户拖动的那个滑块的尺寸,单位 px,默认 40px
43
47
  */
@@ -47,6 +47,12 @@ export declare function useUtils(): {
47
47
  * @return
48
48
  */
49
49
  dataToFile(files: Record<string, any>[]): Promise<File[]>;
50
+ /**
51
+ * @description: 获取文件类型
52
+ * @param fileName
53
+ * @return
54
+ */
55
+ getFileType(fileName: string): "" | "audio" | "video" | "image" | "txt" | "excel" | "word" | "pdf" | "ppt" | "zip" | "other";
50
56
  /**
51
57
  * @description: 将对象格式化为页面跳转参数字符串
52
58
  * @param params
@@ -1,6 +1,6 @@
1
1
  import { ConfigProviderThemeVars } from 'wot-design-uni';
2
2
  import { dynamicFormData, formAttribute, dictionaryData, dictionaryItem, uploadOption, documentView, formRenderer as zhyFormRenderer } from './components/dynamicForm/index';
3
- import { puzzleVcode as zhyPuzzleVcode, vcodeConfigOption } from './components/puzzleVCode/index';
3
+ import { verificationCode as zhyVerificationCode, vcodeConfigOption } from './components/verificationCode/index';
4
4
  import { filePreview as zhyFilePreview, filePreviewOption } from './components/filePreview/index';
5
5
 
6
6
  interface ZhyConfigOptions {
@@ -783,7 +783,7 @@ declare const setTheme: (options: ConfigProviderThemeVars) => {
783
783
  signatureButtonMarginLeft?: string;
784
784
  };
785
785
  export { setTheme };
786
- export { zhyFormRenderer, zhyPuzzleVcode, zhyFilePreview };
786
+ export { zhyFormRenderer, zhyVerificationCode, zhyFilePreview };
787
787
  declare const _default: {
788
788
  install: (app: any, options?: ZhyConfigOptions) => void;
789
789
  };