zhytech-ui 1.2.14 → 1.2.16
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 +13 -1
- package/dist/src/components/dynamicForm/components/common/httpSetting.vue.d.ts +34 -0
- package/dist/src/components/dynamicForm/types/componentAttribute/base/inputAttribute.d.ts +4 -0
- package/dist/src/components/dynamicForm/types/componentAttribute/baseAttribute.d.ts +3 -10
- package/dist/src/components/dynamicForm/types/enum.d.ts +17 -0
- package/dist/src/components/dynamicForm/types/httpSettingView.d.ts +34 -0
- package/dist/src/components/jsonViewer.vue.d.ts +86 -0
- package/dist/src/hooks/useUtils.d.ts +9 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/utils/eventBus.d.ts +6 -0
- package/dist/style.css +1 -1
- package/dist/zhytech-ui.es.js +8521 -7067
- package/dist/zhytech-ui.umd.js +15 -13
- package/package.json +83 -81
package/README.md
CHANGED
|
@@ -90,7 +90,19 @@ npm install --legacy-peer-deps
|
|
|
90
90
|
|
|
91
91
|
> #### 版本更新清单:
|
|
92
92
|
|
|
93
|
-
**V 1.2.
|
|
93
|
+
**V 1.2.16**
|
|
94
|
+
```html
|
|
95
|
+
1.绑定字典选择时添加fixedItemID赋值
|
|
96
|
+
2.修复组装动态请求数据时动态参数获取错误
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**V 1.2.15**
|
|
100
|
+
```html
|
|
101
|
+
1.新增jsonViewer组件,用于查看json格式数据
|
|
102
|
+
2.zhy-dynamic-form组件的input组件新增支持设置动态请求数据
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**V 1.2.14**
|
|
94
106
|
```html
|
|
95
107
|
1.调整zhy-dynamic-form组件的单选、多选组件的选项支持设置分数,getData方法返回数据时,包含选项的分数
|
|
96
108
|
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { eventTypeEnum } from '../../types/enum';
|
|
2
|
+
import { httpSettingView } from '../../types/httpSettingView';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
eventType: eventTypeEnum;
|
|
5
|
+
componentID: string;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = {
|
|
8
|
+
modelValue?: httpSettingView[];
|
|
9
|
+
} & __VLS_Props;
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {
|
|
16
|
+
httpSettingForm: unknown;
|
|
17
|
+
};
|
|
18
|
+
rootEl: HTMLDivElement;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (value: httpSettingView[]) => any;
|
|
23
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
|
+
"onUpdate:modelValue"?: ((value: httpSettingView[]) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
26
|
+
httpSettingForm: unknown;
|
|
27
|
+
}, HTMLDivElement>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { httpSettingView } from '../httpSettingView';
|
|
1
2
|
/**
|
|
2
3
|
* @description: 组件基本属性类型
|
|
3
4
|
*/
|
|
@@ -91,15 +92,7 @@ export interface baseAttribute {
|
|
|
91
92
|
*/
|
|
92
93
|
lineBreak?: boolean;
|
|
93
94
|
/**
|
|
94
|
-
*
|
|
95
|
+
* HTTP请求设置
|
|
95
96
|
*/
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* 获取远端数据接口参数
|
|
99
|
-
*/
|
|
100
|
-
dataInterfaceParameter?: Record<string, any>[];
|
|
101
|
-
/**
|
|
102
|
-
* 远端数据属性映射
|
|
103
|
-
*/
|
|
104
|
-
dataAttributeMapping?: Record<string, string>;
|
|
97
|
+
httpSettings?: httpSettingView[];
|
|
105
98
|
}
|
|
@@ -137,3 +137,20 @@ export declare enum relevanceType {
|
|
|
137
137
|
*/
|
|
138
138
|
autoCancel = "\u81EA\u52A8\u53D6\u6D88"
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* @description: 事件类型
|
|
142
|
+
*/
|
|
143
|
+
export declare enum eventTypeEnum {
|
|
144
|
+
/**
|
|
145
|
+
* 改变事件
|
|
146
|
+
*/
|
|
147
|
+
Change = "change",
|
|
148
|
+
/**
|
|
149
|
+
* 点击事件
|
|
150
|
+
*/
|
|
151
|
+
Click = "click",
|
|
152
|
+
/**
|
|
153
|
+
* 查询事件
|
|
154
|
+
*/
|
|
155
|
+
Query = "query"
|
|
156
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { eventTypeEnum } from './enum';
|
|
2
|
+
/**
|
|
3
|
+
* @description: HTTP请求设置
|
|
4
|
+
*/
|
|
5
|
+
export interface httpSettingView {
|
|
6
|
+
/**
|
|
7
|
+
* HTTP请求类型
|
|
8
|
+
*/
|
|
9
|
+
eventType: eventTypeEnum;
|
|
10
|
+
/**
|
|
11
|
+
* HTTP基础URL
|
|
12
|
+
*/
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* HTTP函数URL
|
|
16
|
+
*/
|
|
17
|
+
functionUrl: string;
|
|
18
|
+
/**
|
|
19
|
+
* HTTP请求方法
|
|
20
|
+
*/
|
|
21
|
+
method?: "post" | "get";
|
|
22
|
+
/**
|
|
23
|
+
* HTTP请求参数
|
|
24
|
+
*/
|
|
25
|
+
parameters?: Record<string, any>[];
|
|
26
|
+
/**
|
|
27
|
+
* 是否映射到组件实例
|
|
28
|
+
*/
|
|
29
|
+
dataMappingSelf?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* HTTP数据映射
|
|
32
|
+
*/
|
|
33
|
+
dataMappings?: Record<string, string>[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
jsonData: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {};
|
|
5
|
+
};
|
|
6
|
+
deep: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
showLength: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
highlightSelected: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
showLineNumber: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
showIcon: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
virtual: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
height: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
34
|
+
editable: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
39
|
+
jsonData: {
|
|
40
|
+
type: ObjectConstructor;
|
|
41
|
+
default: () => {};
|
|
42
|
+
};
|
|
43
|
+
deep: {
|
|
44
|
+
type: NumberConstructor;
|
|
45
|
+
default: number;
|
|
46
|
+
};
|
|
47
|
+
showLength: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
highlightSelected: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
showLineNumber: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
showIcon: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
virtual: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
height: {
|
|
68
|
+
type: NumberConstructor;
|
|
69
|
+
default: number;
|
|
70
|
+
};
|
|
71
|
+
editable: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
}>> & Readonly<{}>, {
|
|
76
|
+
height: number;
|
|
77
|
+
deep: number;
|
|
78
|
+
jsonData: Record<string, any>;
|
|
79
|
+
showLength: boolean;
|
|
80
|
+
highlightSelected: boolean;
|
|
81
|
+
showLineNumber: boolean;
|
|
82
|
+
showIcon: boolean;
|
|
83
|
+
virtual: boolean;
|
|
84
|
+
editable: boolean;
|
|
85
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
86
|
+
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { httpSettingView } from '../components/dynamicForm/types/httpSettingView';
|
|
1
2
|
export declare function useUtils(): {
|
|
2
3
|
/**
|
|
3
4
|
* @description: 计算表达式,实现eval函数功能,解决使用eval时编译报错
|
|
@@ -79,4 +80,12 @@ export declare function useUtils(): {
|
|
|
79
80
|
* value: localStorage的value
|
|
80
81
|
*/
|
|
81
82
|
session(key: string, value?: any): any;
|
|
83
|
+
/**
|
|
84
|
+
* @description: 调用api
|
|
85
|
+
* @param httpSetting 接口配置
|
|
86
|
+
* @param datas 接口参数替换数据
|
|
87
|
+
* @param autoDealResult 是否自动处理结果
|
|
88
|
+
* @return
|
|
89
|
+
*/
|
|
90
|
+
callApi(httpSetting: httpSettingView, datas: Record<string, any>, autoDealResult?: boolean): Promise<Record<string, any>>;
|
|
82
91
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ 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 { default as zhyJsonViewer } from './components/jsonViewer.vue';
|
|
5
6
|
import { filePreview as zhyFilePreview, fileView, filePreviewOption, videoConfigType, pdfOptionType } from './components/filePreview/index';
|
|
6
7
|
import { richTextEditor as zhyRichTextEditor, richTextConfigOption } from './components/richTextEditor/index';
|
|
7
8
|
import { verificationCode as zhyVerificationCode, vcodeConfigOption } from './components/verificationCode/index';
|
|
@@ -16,7 +17,7 @@ type selectOptionsView = SelectOptionsView;
|
|
|
16
17
|
export type { optionView, selectOptionsView, conditionType, filterConditionPropType, filterConditionType, filterItemType, propOptionType, dynamicFormData, formAttribute, dictionaryData, dictionaryItem, uploadOption, documentView, batchAddComponentParam, getFormTemplateMethod, formListView, searchParam, fileView, filePreviewOption, videoConfigType, pdfOptionType, richTextConfigOption, vcodeConfigOption };
|
|
17
18
|
export { MessageType, filterConditionTypes, componentType };
|
|
18
19
|
export { setTheme };
|
|
19
|
-
export { zhyFormDesigner, zhyFormRenderer, zhyDynamicFilter, zhyIcon, zhyFilePreview, zhyRichTextEditor, zhyVerificationCode };
|
|
20
|
+
export { zhyFormDesigner, zhyFormRenderer, zhyDynamicFilter, zhyIcon, zhyFilePreview, zhyRichTextEditor, zhyVerificationCode, zhyJsonViewer };
|
|
20
21
|
declare const _default: {
|
|
21
22
|
install: (app: any, options?: Record<string, any>) => void;
|
|
22
23
|
};
|