zhytech-ui 1.1.36 → 1.1.38

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 CHANGED
@@ -70,6 +70,17 @@ setTheme("dark");
70
70
 
71
71
  > #### 版本更新清单:
72
72
 
73
+ **V 1.1.38**
74
+ ```html
75
+ 1.优化文件预览,视频播放器参数,支持设置开始播放时间、支持禁用快进快退、支持设置宽高、支持设置自动播放、支持设置循环播放、支持设置静音、支持设置全屏、支持设置音量、支持设置播放速度、支持画中画、支持直播
76
+ ```
77
+
78
+ **V 1.1.37**
79
+ ```html
80
+ 1.富文本组件(richTextEditor)新增隐藏顶部工具栏、显示浮动工具栏、自动获取焦点属性,暴漏option类型richTextConfigOption
81
+ 2.新增拼图验证码组件(zhyPuzzleVcode),暴漏option类型vcodeConfigOption
82
+ ```
83
+
73
84
  **V 1.1.36**
74
85
  ```html
75
86
  1.调整优化答题卡判断是否答对逻辑
@@ -0,0 +1,67 @@
1
+ import { videoConfigType } from '../types/filePreviewType';
2
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
3
+ src: {
4
+ type: StringConstructor;
5
+ required: true;
6
+ };
7
+ options: {
8
+ type: globalThis.PropType<videoConfigType>;
9
+ default: () => {};
10
+ };
11
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ canplay: (...args: any[]) => void;
13
+ canplaythrough: (...args: any[]) => void;
14
+ durationchange: (...args: any[]) => void;
15
+ ended: (...args: any[]) => void;
16
+ error: (...args: any[]) => void;
17
+ loadeddata: (...args: any[]) => void;
18
+ loadedmetadata: (...args: any[]) => void;
19
+ loadstart: (...args: any[]) => void;
20
+ pause: (...args: any[]) => void;
21
+ play: (...args: any[]) => void;
22
+ playing: (...args: any[]) => void;
23
+ progress: (...args: any[]) => void;
24
+ ratechange: (...args: any[]) => void;
25
+ stalled: (...args: any[]) => void;
26
+ timeupdate: (...args: any[]) => void;
27
+ volumechange: (...args: any[]) => void;
28
+ waiting: (...args: any[]) => void;
29
+ mirrorChange: (...args: any[]) => void;
30
+ loopChange: (...args: any[]) => void;
31
+ lightOffChange: (...args: any[]) => void;
32
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
33
+ src: {
34
+ type: StringConstructor;
35
+ required: true;
36
+ };
37
+ options: {
38
+ type: globalThis.PropType<videoConfigType>;
39
+ default: () => {};
40
+ };
41
+ }>> & Readonly<{
42
+ onCanplay?: ((...args: any[]) => any) | undefined;
43
+ onCanplaythrough?: ((...args: any[]) => any) | undefined;
44
+ onDurationchange?: ((...args: any[]) => any) | undefined;
45
+ onEnded?: ((...args: any[]) => any) | undefined;
46
+ onError?: ((...args: any[]) => any) | undefined;
47
+ onLoadeddata?: ((...args: any[]) => any) | undefined;
48
+ onLoadedmetadata?: ((...args: any[]) => any) | undefined;
49
+ onLoadstart?: ((...args: any[]) => any) | undefined;
50
+ onPause?: ((...args: any[]) => any) | undefined;
51
+ onPlay?: ((...args: any[]) => any) | undefined;
52
+ onPlaying?: ((...args: any[]) => any) | undefined;
53
+ onProgress?: ((...args: any[]) => any) | undefined;
54
+ onRatechange?: ((...args: any[]) => any) | undefined;
55
+ onStalled?: ((...args: any[]) => any) | undefined;
56
+ onTimeupdate?: ((...args: any[]) => any) | undefined;
57
+ onVolumechange?: ((...args: any[]) => any) | undefined;
58
+ onWaiting?: ((...args: any[]) => any) | undefined;
59
+ onMirrorChange?: ((...args: any[]) => any) | undefined;
60
+ onLoopChange?: ((...args: any[]) => any) | undefined;
61
+ onLightOffChange?: ((...args: any[]) => any) | undefined;
62
+ }>, {
63
+ options: videoConfigType;
64
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
65
+ videoPlayer: unknown;
66
+ }, HTMLDivElement>;
67
+ export default _default;
@@ -1,4 +1,4 @@
1
1
  import { default as filePreview } from './index.vue';
2
- import { fileView, previewOption } from './types/filePreviewType';
2
+ import { fileView, previewOption, videoConfigType } from './types/filePreviewType';
3
3
  export { filePreview };
4
- export type { fileView, previewOption };
4
+ export type { fileView, previewOption, videoConfigType };
@@ -15,6 +15,160 @@ export interface fileView {
15
15
  */
16
16
  extensionName: string;
17
17
  }
18
+ export interface videoConfigType {
19
+ /**
20
+ * 播放器宽度,默认800px
21
+ */
22
+ width?: string;
23
+ /**
24
+ * 播放器高度,默认450px
25
+ */
26
+ height?: string;
27
+ /**
28
+ * 主题色,默认#409eff
29
+ */
30
+ color?: string;
31
+ /**
32
+ * 视频名称,默认空
33
+ */
34
+ title?: string;
35
+ /**
36
+ * 视频类型,默认video/mp4
37
+ */
38
+ type?: string;
39
+ /**
40
+ * 视频封面,默认空
41
+ */
42
+ poster?: string;
43
+ /**
44
+ * 静音,默认false
45
+ */
46
+ muted?: boolean;
47
+ /**
48
+ * 跳转到固定播放时间(s),默认0
49
+ */
50
+ currentTime?: number;
51
+ /**
52
+ * 是否支持快进快退,默认true
53
+ */
54
+ speed?: boolean;
55
+ /**
56
+ * 播放倍速,默认['0.5','0.75','1','1.25','1.5','2']
57
+ */
58
+ speedRate?: string[];
59
+ /**
60
+ * 自动播放,默认false
61
+ */
62
+ autoPlay?: boolean;
63
+ /**
64
+ * 循环播放,默认false
65
+ */
66
+ loop?: boolean;
67
+ /**
68
+ * 预加载,默认auto
69
+ */
70
+ preload?: "none" | "meta" | "auto";
71
+ /**
72
+ * 镜像画面,默认false
73
+ */
74
+ mirror?: boolean;
75
+ /**
76
+ * 关灯模式,默认false
77
+ */
78
+ ligthOff?: boolean;
79
+ /**
80
+ * 视频音量大小,默认1
81
+ */
82
+ volume?: number;
83
+ /**
84
+ * 是否显示控制条,默认true
85
+ */
86
+ control?: boolean;
87
+ /**
88
+ * 控制条显示的按钮,默认['speedRate', 'volume', 'setting', 'pip', 'fullScreen']
89
+ */
90
+ controlBtns?: ("speedRate" | "volume" | "setting" | "pip" | "fullScreen")[];
91
+ /**
92
+ * 镜像翻转事件
93
+ */
94
+ onMirrorChange?: Function;
95
+ /**
96
+ * 循环播放开关事件
97
+ */
98
+ onLoopChange?: Function;
99
+ /**
100
+ * 关灯模式事件
101
+ */
102
+ onLightOffChange?: Function;
103
+ /**
104
+ * 客户端开始请求数据
105
+ */
106
+ onLoadstart?: Function;
107
+ /**
108
+ * 客户端正在请求数据
109
+ */
110
+ onProgress?: Function;
111
+ /**
112
+ * 请求数据时遇到错误
113
+ */
114
+ onError?: Function;
115
+ /**
116
+ * 网速失速
117
+ */
118
+ onStalled?: Function;
119
+ /**
120
+ * 开始播放时触发
121
+ */
122
+ onPlay?: Function;
123
+ /**
124
+ * 暂停时触发
125
+ */
126
+ onPause?: Function;
127
+ /**
128
+ * 成功获取资源长度
129
+ */
130
+ onLoadedmetadata?: Function;
131
+ /**
132
+ * 缓冲中
133
+ */
134
+ onLoadeddata?: Function;
135
+ /**
136
+ * 等待数据,并非错误
137
+ */
138
+ onWaiting?: Function;
139
+ /**
140
+ * 开始回放
141
+ */
142
+ onPlaying?: Function;
143
+ /**
144
+ * 暂停状态下可以播放
145
+ */
146
+ onCanplay?: Function;
147
+ /**
148
+ * 可以持续播放
149
+ */
150
+ onCanplaythrough?: Function;
151
+ /**
152
+ * 更新播放时间
153
+ */
154
+ onTimeupdate?: Function;
155
+ /**
156
+ * 播放结束
157
+ */
158
+ onEnded?: Function;
159
+ /**
160
+ * 播放速率改变
161
+ */
162
+ onRatechange?: Function;
163
+ /**
164
+ * 资源长度改变
165
+ */
166
+ onDurationchange?: Function;
167
+ /**
168
+ * 音量改变
169
+ */
170
+ onVolumechange?: Function;
171
+ }
18
172
  /**
19
173
  * @description: 文档管理中文件上传参数类型
20
174
  */
@@ -30,7 +184,7 @@ export interface previewOption {
30
184
  /**
31
185
  * 自动播放视频
32
186
  */
33
- autoplayVideo?: boolean;
187
+ videoConfig?: videoConfigType;
34
188
  /**
35
189
  * 自动播放音频
36
190
  */
@@ -0,0 +1,4 @@
1
+ import { default as puzzleVcode } from './index.vue';
2
+ import { configOptionView as vcodeConfigOption } from './types/configOptionView';
3
+ export { puzzleVcode };
4
+ export type { vcodeConfigOption };
@@ -0,0 +1,32 @@
1
+ import { configOptionView } from './types/configOptionView';
2
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
3
+ modelValue: {
4
+ type: BooleanConstructor;
5
+ required: false;
6
+ };
7
+ option: {
8
+ type: globalThis.PropType<configOptionView>;
9
+ default: () => {
10
+ mode: string;
11
+ };
12
+ };
13
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ "update:modelValue": (...args: any[]) => void;
15
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
16
+ modelValue: {
17
+ type: BooleanConstructor;
18
+ required: false;
19
+ };
20
+ option: {
21
+ type: globalThis.PropType<configOptionView>;
22
+ default: () => {
23
+ mode: string;
24
+ };
25
+ };
26
+ }>> & Readonly<{
27
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
28
+ }>, {
29
+ modelValue: boolean;
30
+ option: configOptionView;
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
32
+ export default _default;
@@ -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
+ }
@@ -13,8 +13,9 @@ export declare function useConfig(): {
13
13
  };
14
14
  modalAppendToBody: boolean;
15
15
  };
16
- editorDefaultConfig: {
16
+ editorDefaultConfig: (showTextHoverBar?: boolean) => {
17
17
  hoverbarKeys: {
18
+ text: {};
18
19
  link: {
19
20
  menuKeys: string[];
20
21
  };
@@ -1,4 +1,4 @@
1
1
  import { default as richTextEditor } from './index.vue';
2
- import { fileView, previewOption } from './types/richTextEditorOption';
2
+ import { configOptionView as richTextConfigOption } from './types/configOptionView';
3
3
  export { richTextEditor };
4
- export type { fileView, previewOption };
4
+ export type { richTextConfigOption };
@@ -1,6 +1,7 @@
1
+ import { configOptionView } from './types/configOptionView';
1
2
  declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
3
  option: {
3
- type: globalThis.PropType<any>;
4
+ type: globalThis.PropType<configOptionView>;
4
5
  default: () => {
5
6
  mode: string;
6
7
  };
@@ -12,7 +13,7 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
12
13
  "update:modelValue": (value: any) => any;
13
14
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
14
15
  option: {
15
- type: globalThis.PropType<any>;
16
+ type: globalThis.PropType<configOptionView>;
16
17
  default: () => {
17
18
  mode: string;
18
19
  };
@@ -23,6 +24,6 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
23
24
  }>> & Readonly<{
24
25
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
26
  }>, {
26
- option: any;
27
+ option: configOptionView;
27
28
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
28
29
  export default _default;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @description: 配置选项类型
3
+ */
4
+ export interface configOptionView {
5
+ /**
6
+ * 编辑器模式,默认default,simple为简单模式
7
+ */
8
+ mode?: "simple" | "default";
9
+ /**
10
+ * 是否只读,默认false
11
+ */
12
+ readOnly?: boolean;
13
+ /**
14
+ * 是否隐藏工具栏,默认false
15
+ */
16
+ hiddenToolbar?: boolean;
17
+ /**
18
+ * 是否显示文本悬浮工具栏, mode=default时 默认true,mode=simple时默认false
19
+ */
20
+ showTextHoverBar?: boolean;
21
+ /**
22
+ * 是否自动聚焦,默认false
23
+ */
24
+ autoFocus?: boolean;
25
+ /**
26
+ * 最大长度,默认无限制
27
+ */
28
+ maxLength?: number;
29
+ /**
30
+ * 占位符,默认 请输入内容……
31
+ */
32
+ placeholder?: string;
33
+ /**
34
+ * 超出最大长度的回调函数,默认无
35
+ */
36
+ onMaxLength?: Function;
37
+ }
@@ -2,8 +2,9 @@ import { MessageType, filterConditionTypes, componentType } from './types/enum';
2
2
  import { dynamicFilter as zhyDynamicFilter, conditionType, filterConditionPropType, filterConditionType, filterItemType, propOptionType } from './components/dynamicFilter/index';
3
3
  import { documentView, dynamicFormData, formAttribute, dictionaryData, dictionaryItem, uploadOption, batchAddComponentParam, getFormTemplateMethod, formListView, searchParam, formDesigner as zhyFormDesigner, formRenderer as zhyFormRenderer } from './components/dynamicForm/index';
4
4
  import { icon as zhyIcon } from './components/icon/index';
5
- import { filePreview as zhyFilePreview, fileView, previewOption } from './components/filePreview/index';
6
- import { richTextEditor as zhyRichTextEditor } from './components/richTextEditor/index';
5
+ import { filePreview as zhyFilePreview, fileView, previewOption, videoConfigType } from './components/filePreview/index';
6
+ import { richTextEditor as zhyRichTextEditor, richTextConfigOption } from './components/richTextEditor/index';
7
+ import { puzzleVcode as zhyPuzzleVcode, vcodeConfigOption } from './components/puzzleVCode/index';
7
8
  /**
8
9
  * @description: 设置组件库主题
9
10
  * @param theme
@@ -12,10 +13,10 @@ import { richTextEditor as zhyRichTextEditor } from './components/richTextEditor
12
13
  declare const setTheme: (theme: string) => void;
13
14
  type optionView = OptionView;
14
15
  type selectOptionsView = SelectOptionsView;
15
- export type { optionView, selectOptionsView, conditionType, filterConditionPropType, filterConditionType, filterItemType, propOptionType, dynamicFormData, formAttribute, dictionaryData, dictionaryItem, uploadOption, documentView, batchAddComponentParam, getFormTemplateMethod, formListView, searchParam, fileView, previewOption };
16
+ export type { optionView, selectOptionsView, conditionType, filterConditionPropType, filterConditionType, filterItemType, propOptionType, dynamicFormData, formAttribute, dictionaryData, dictionaryItem, uploadOption, documentView, batchAddComponentParam, getFormTemplateMethod, formListView, searchParam, fileView, previewOption, videoConfigType, richTextConfigOption, vcodeConfigOption };
16
17
  export { MessageType, filterConditionTypes, componentType };
17
18
  export { setTheme };
18
- export { zhyFormDesigner, zhyFormRenderer, zhyDynamicFilter, zhyIcon, zhyFilePreview, zhyRichTextEditor };
19
+ export { zhyFormDesigner, zhyFormRenderer, zhyDynamicFilter, zhyIcon, zhyFilePreview, zhyRichTextEditor, zhyPuzzleVcode };
19
20
  declare const _default: {
20
21
  install: (app: any, options?: Record<string, any> | undefined) => void;
21
22
  };