zhytech-ui 1.1.36 → 1.1.37

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,12 @@ setTheme("dark");
70
70
 
71
71
  > #### 版本更新清单:
72
72
 
73
+ **V 1.1.37**
74
+ ```html
75
+ 1.富文本组件(richTextEditor)新增隐藏顶部工具栏、显示浮动工具栏、自动获取焦点属性,暴漏option类型richTextConfigOption
76
+ 2.新增拼图验证码组件(zhyPuzzleVcode),暴漏option类型vcodeConfigOption
77
+ ```
78
+
73
79
  **V 1.1.36**
74
80
  ```html
75
81
  1.调整优化答题卡判断是否答对逻辑
@@ -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
+ }
@@ -3,7 +3,8 @@ import { dynamicFilter as zhyDynamicFilter, conditionType, filterConditionPropTy
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
5
  import { filePreview as zhyFilePreview, fileView, previewOption } from './components/filePreview/index';
6
- import { richTextEditor as zhyRichTextEditor } from './components/richTextEditor/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, 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
  };