zhytech-ui 1.0.36 → 1.0.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 +10 -3
- package/dist/src/components/dynamicForm/components/base/index.d.ts +2 -1
- package/dist/src/components/dynamicForm/components/base/inputNumber/index.d.ts +107 -0
- package/dist/src/components/dynamicForm/components/base/inputNumber/propsEditor.vue.d.ts +2 -0
- package/dist/src/components/dynamicForm/components/base/inputNumber/renderer.vue.d.ts +113 -0
- package/dist/src/components/dynamicForm/formRenderer.vue.d.ts +8 -2
- package/dist/src/components/dynamicForm/types/abnormalCheckView.d.ts +18 -0
- package/dist/src/components/dynamicForm/types/componentAttribute/base/inputNumberAttribute.d.ts +27 -0
- package/dist/src/components/dynamicForm/types/componentAttribute/baseAttribute.d.ts +12 -0
- package/dist/src/components/dynamicForm/types/componentAttribute/index.d.ts +2 -1
- package/dist/src/components/dynamicForm/types/relevanceConditionView.d.ts +21 -0
- package/dist/src/types/enum.d.ts +61 -0
- package/dist/style.css +1 -1
- package/dist/zhytech-ui.es.js +5483 -4898
- package/dist/zhytech-ui.umd.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# zhytechUI
|
|
2
2
|
|
|
3
3
|
> ### 简介
|
|
4
|
-
一个基于Vue3 + ElementPlus + TypeScript
|
|
4
|
+
一个基于Vue3 + ElementPlus + TypeScript封装的前端UI组件库
|
|
5
5
|
|
|
6
6
|
> ### 组件列表
|
|
7
7
|
#### 1、dynamicForm
|
|
@@ -28,11 +28,12 @@ npm i zhytech-ui@latest -S
|
|
|
28
28
|
1)、按需引入:在要使用的页面添加下面代码即可
|
|
29
29
|
```ts
|
|
30
30
|
import { ZhyFormDesigner, ZhyFormRenderer } from "zhytech-ui"
|
|
31
|
+
import "zhytech-ui/dist/style.css";
|
|
31
32
|
```
|
|
32
|
-
2)
|
|
33
|
+
2)、全局引入:在main.ts中引入,在项目内任何页面都不需要单独引入
|
|
33
34
|
```ts
|
|
34
35
|
import zhytechUI from "zhytech-ui";
|
|
35
|
-
import "
|
|
36
|
+
import "zhytech-ui/dist/style.css";
|
|
36
37
|
createApp(app).use(zhytechUI)
|
|
37
38
|
```
|
|
38
39
|
|
|
@@ -51,6 +52,12 @@ createApp(app).use(zhytechUI)
|
|
|
51
52
|
2)、此组件css样式依赖scss开发,使用者项目还需要添加scss依赖。
|
|
52
53
|
|
|
53
54
|
> #### 版本更新清单:
|
|
55
|
+
**V 1.0.37**
|
|
56
|
+
```
|
|
57
|
+
1.zhy-form-designer组件新增数字框组件,支持允许输入文本、支持上下限限制配置
|
|
58
|
+
2.优化zhy-icon组件内部逻辑
|
|
59
|
+
3.优化组件库样式
|
|
60
|
+
```
|
|
54
61
|
|
|
55
62
|
**V 1.0.36**
|
|
56
63
|
```
|
|
@@ -4,4 +4,5 @@ import { default as label } from './label/index';
|
|
|
4
4
|
import { default as radio } from './radio/index';
|
|
5
5
|
import { default as date } from './date/index';
|
|
6
6
|
import { default as time } from './time/index';
|
|
7
|
-
|
|
7
|
+
import { default as inputNumber } from './inputNumber/index';
|
|
8
|
+
export { label, input, radio, checkbox, date, time, inputNumber };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { default as baseComponent } from '../../../types/baseComponent';
|
|
2
|
+
import { baseAttribute, editAttribute, inputNumberAttribute } from '../../../types/componentAttribute/index';
|
|
3
|
+
declare class component extends baseComponent {
|
|
4
|
+
/**
|
|
5
|
+
* @description: 构造器
|
|
6
|
+
*/
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* @description: 获取校验规则
|
|
10
|
+
* @param componentProps
|
|
11
|
+
* @return
|
|
12
|
+
*/
|
|
13
|
+
getRules(componentProps: Record<string, any>): ({
|
|
14
|
+
required: any;
|
|
15
|
+
message: any;
|
|
16
|
+
pattern?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
pattern: any;
|
|
19
|
+
message: any;
|
|
20
|
+
required?: undefined;
|
|
21
|
+
})[];
|
|
22
|
+
/**
|
|
23
|
+
* @description: 获取过滤条件属性
|
|
24
|
+
* @param componentProps
|
|
25
|
+
* @return
|
|
26
|
+
*/
|
|
27
|
+
getFilterConditionProps(componentProps: Record<string, any>): {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @description: 获取组件要排除的过滤条件集合
|
|
32
|
+
*/
|
|
33
|
+
getExcludeFilterConditions(): ("NOT_EQUALS" | "INCLUDES" | "EXCLUDE" | "EMPTY" | "EQUALS" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUALS" | "LESS_THAN_OR_EQUALS" | "RANGE")[];
|
|
34
|
+
}
|
|
35
|
+
declare const _default: {
|
|
36
|
+
component: typeof component;
|
|
37
|
+
renderer: import('vue').DefineComponent<{
|
|
38
|
+
isDesigner: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
disabled: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
readonly: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
componentID: {
|
|
51
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
datas: {
|
|
55
|
+
type: globalThis.PropType<Record<string, any>>;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
componentProps: {
|
|
59
|
+
type: globalThis.PropType<baseAttribute & editAttribute & inputNumberAttribute>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
showDescription: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
67
|
+
"update:datas": (...args: any[]) => void;
|
|
68
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
69
|
+
isDesigner: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
disabled: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
readonly: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
componentID: {
|
|
82
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
83
|
+
required: true;
|
|
84
|
+
};
|
|
85
|
+
datas: {
|
|
86
|
+
type: globalThis.PropType<Record<string, any>>;
|
|
87
|
+
required: true;
|
|
88
|
+
};
|
|
89
|
+
componentProps: {
|
|
90
|
+
type: globalThis.PropType<baseAttribute & editAttribute & inputNumberAttribute>;
|
|
91
|
+
required: true;
|
|
92
|
+
};
|
|
93
|
+
showDescription: {
|
|
94
|
+
type: BooleanConstructor;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
97
|
+
}>> & {
|
|
98
|
+
"onUpdate:datas"?: ((...args: any[]) => any) | undefined;
|
|
99
|
+
}, {
|
|
100
|
+
disabled: boolean;
|
|
101
|
+
readonly: boolean;
|
|
102
|
+
showDescription: boolean;
|
|
103
|
+
isDesigner: boolean;
|
|
104
|
+
}, {}>;
|
|
105
|
+
propEditor: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{}>>, {}, {}>;
|
|
106
|
+
};
|
|
107
|
+
export default _default;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { baseAttribute, editAttribute, inputNumberAttribute } from '../../../types/componentAttribute/index';
|
|
2
|
+
type componentType = baseAttribute & editAttribute & inputNumberAttribute;
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{
|
|
4
|
+
/**
|
|
5
|
+
* 是否为设计模式
|
|
6
|
+
*/
|
|
7
|
+
isDesigner: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 是否禁用
|
|
13
|
+
*/
|
|
14
|
+
disabled: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 是否只读
|
|
20
|
+
*/
|
|
21
|
+
readonly: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 组件ID
|
|
27
|
+
*/
|
|
28
|
+
componentID: {
|
|
29
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 表单数据
|
|
34
|
+
*/
|
|
35
|
+
datas: {
|
|
36
|
+
type: globalThis.PropType<Record<string, any>>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* 组件属性
|
|
41
|
+
*/
|
|
42
|
+
componentProps: {
|
|
43
|
+
type: globalThis.PropType<componentType>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* 是否项目说明/答案解析
|
|
48
|
+
*/
|
|
49
|
+
showDescription: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
54
|
+
"update:datas": (...args: any[]) => void;
|
|
55
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
56
|
+
/**
|
|
57
|
+
* 是否为设计模式
|
|
58
|
+
*/
|
|
59
|
+
isDesigner: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* 是否禁用
|
|
65
|
+
*/
|
|
66
|
+
disabled: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* 是否只读
|
|
72
|
+
*/
|
|
73
|
+
readonly: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* 组件ID
|
|
79
|
+
*/
|
|
80
|
+
componentID: {
|
|
81
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
82
|
+
required: true;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 表单数据
|
|
86
|
+
*/
|
|
87
|
+
datas: {
|
|
88
|
+
type: globalThis.PropType<Record<string, any>>;
|
|
89
|
+
required: true;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 组件属性
|
|
93
|
+
*/
|
|
94
|
+
componentProps: {
|
|
95
|
+
type: globalThis.PropType<componentType>;
|
|
96
|
+
required: true;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* 是否项目说明/答案解析
|
|
100
|
+
*/
|
|
101
|
+
showDescription: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
105
|
+
}>> & {
|
|
106
|
+
"onUpdate:datas"?: ((...args: any[]) => any) | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
disabled: boolean;
|
|
109
|
+
readonly: boolean;
|
|
110
|
+
showDescription: boolean;
|
|
111
|
+
isDesigner: boolean;
|
|
112
|
+
}, {}>;
|
|
113
|
+
export default _default;
|
|
@@ -52,12 +52,15 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* 批量导入时传入已选择组件集合
|
|
56
56
|
*/
|
|
57
57
|
selectComponents: {
|
|
58
58
|
type: globalThis.PropType<Record<string, any>[]>;
|
|
59
59
|
default: () => never[];
|
|
60
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* 隐藏标题
|
|
63
|
+
*/
|
|
61
64
|
hiddenTitle: {
|
|
62
65
|
type: BooleanConstructor;
|
|
63
66
|
default: boolean;
|
|
@@ -153,12 +156,15 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
153
156
|
default: boolean;
|
|
154
157
|
};
|
|
155
158
|
/**
|
|
156
|
-
*
|
|
159
|
+
* 批量导入时传入已选择组件集合
|
|
157
160
|
*/
|
|
158
161
|
selectComponents: {
|
|
159
162
|
type: globalThis.PropType<Record<string, any>[]>;
|
|
160
163
|
default: () => never[];
|
|
161
164
|
};
|
|
165
|
+
/**
|
|
166
|
+
* 隐藏标题
|
|
167
|
+
*/
|
|
162
168
|
hiddenTitle: {
|
|
163
169
|
type: BooleanConstructor;
|
|
164
170
|
default: boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { abnormalCheckType, checkLevelType } from '../../../types/enum';
|
|
2
|
+
type abnormalCheck = keyof typeof abnormalCheckType;
|
|
3
|
+
type checkLevel = keyof typeof checkLevelType;
|
|
4
|
+
export interface abnormalCheckView {
|
|
5
|
+
/**
|
|
6
|
+
* 类型
|
|
7
|
+
*/
|
|
8
|
+
type: abnormalCheck;
|
|
9
|
+
/**
|
|
10
|
+
* 检核值
|
|
11
|
+
*/
|
|
12
|
+
value: number;
|
|
13
|
+
/**
|
|
14
|
+
* 检核级别
|
|
15
|
+
*/
|
|
16
|
+
level: checkLevel;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/src/components/dynamicForm/types/componentAttribute/base/inputNumberAttribute.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { abnormalCheckView } from '../../abnormalCheckView';
|
|
2
|
+
import { relevanceConditionView } from '../../relevanceConditionView';
|
|
3
|
+
/**
|
|
4
|
+
* @description: 数字框组件(inputNumber)独有属性
|
|
5
|
+
*/
|
|
6
|
+
export interface inputNumberAttribute {
|
|
7
|
+
/**
|
|
8
|
+
* 单位
|
|
9
|
+
*/
|
|
10
|
+
unit: string;
|
|
11
|
+
/**
|
|
12
|
+
* 是否允许输入文本
|
|
13
|
+
*/
|
|
14
|
+
allowText: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 允许输入的文本
|
|
17
|
+
*/
|
|
18
|
+
allowTextOptions?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* 异常值检核列表
|
|
21
|
+
*/
|
|
22
|
+
abnormalCheckList?: abnormalCheckView[];
|
|
23
|
+
/**
|
|
24
|
+
* 关联条件列表
|
|
25
|
+
*/
|
|
26
|
+
relevanceConditionList?: relevanceConditionView[];
|
|
27
|
+
}
|
|
@@ -86,4 +86,16 @@ export interface baseAttribute {
|
|
|
86
86
|
* 所属tabs组件的页签ID
|
|
87
87
|
*/
|
|
88
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>;
|
|
89
101
|
}
|
|
@@ -9,5 +9,6 @@ import { checkboxAttribute } from './base/checkboxAttribute';
|
|
|
9
9
|
import { inputAttribute } from './base/inputAttribute';
|
|
10
10
|
import { radioAttribute } from './base/radioAttribute';
|
|
11
11
|
import { datetimeAttribute } from './base/datetimeAttribute';
|
|
12
|
+
import { inputNumberAttribute } from './base/inputNumberAttribute';
|
|
12
13
|
import { editAttribute } from './editAttribute';
|
|
13
|
-
export type { baseAttribute, groupLayoutAttribute, tabsLayoutAttribute, uploadAttribute, employeeAttribute, gradeAttribute, postAttribute, editAttribute, inputAttribute, radioAttribute, checkboxAttribute, datetimeAttribute };
|
|
14
|
+
export type { baseAttribute, groupLayoutAttribute, tabsLayoutAttribute, uploadAttribute, employeeAttribute, gradeAttribute, postAttribute, editAttribute, inputAttribute, radioAttribute, checkboxAttribute, datetimeAttribute, inputNumberAttribute };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { relevanceType } from '../../../types/enum';
|
|
2
|
+
type relevance = keyof typeof relevanceType;
|
|
3
|
+
export interface relevanceConditionView {
|
|
4
|
+
/**
|
|
5
|
+
* 类型
|
|
6
|
+
*/
|
|
7
|
+
type: relevance;
|
|
8
|
+
/**
|
|
9
|
+
* 上限值
|
|
10
|
+
*/
|
|
11
|
+
upperLimit: number;
|
|
12
|
+
/**
|
|
13
|
+
* 下限值
|
|
14
|
+
*/
|
|
15
|
+
lowerLimit: number;
|
|
16
|
+
/**
|
|
17
|
+
* 目标项目序号
|
|
18
|
+
*/
|
|
19
|
+
targetItemID: string;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
package/dist/src/types/enum.d.ts
CHANGED
|
@@ -68,10 +68,71 @@ export declare enum filterConditionTypes {
|
|
|
68
68
|
* @description: 组件类型
|
|
69
69
|
*/
|
|
70
70
|
export declare enum componentType {
|
|
71
|
+
/**
|
|
72
|
+
* 输入框
|
|
73
|
+
*/
|
|
71
74
|
INPUT = "input",
|
|
75
|
+
/**
|
|
76
|
+
* 日期时间
|
|
77
|
+
*/
|
|
72
78
|
DATETIME = "datetime",
|
|
79
|
+
/**
|
|
80
|
+
* 日期
|
|
81
|
+
*/
|
|
73
82
|
DATE = "date",
|
|
83
|
+
/**
|
|
84
|
+
* 时间
|
|
85
|
+
*/
|
|
74
86
|
TIME = "time",
|
|
87
|
+
/**
|
|
88
|
+
* 下拉框
|
|
89
|
+
*/
|
|
75
90
|
SELECTOR = "selector",
|
|
91
|
+
/**
|
|
92
|
+
* 级联选择器
|
|
93
|
+
*/
|
|
76
94
|
CASCADER_SELECTOR = "cascaderSelector"
|
|
77
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* @description: 异常值检核类型
|
|
98
|
+
*/
|
|
99
|
+
export declare enum abnormalCheckType {
|
|
100
|
+
/**
|
|
101
|
+
* 上限
|
|
102
|
+
*/
|
|
103
|
+
upperLimit = "\u4E0A\u9650\u503C",
|
|
104
|
+
/**
|
|
105
|
+
* 下限
|
|
106
|
+
*/
|
|
107
|
+
lowerLimit = "\u4E0B\u9650\u503C",
|
|
108
|
+
/**
|
|
109
|
+
* 小数位数
|
|
110
|
+
*/
|
|
111
|
+
decimalPlace = "\u5C0F\u6570\u4F4D"
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @description: 异常值检核级别类型
|
|
115
|
+
*/
|
|
116
|
+
export declare enum checkLevelType {
|
|
117
|
+
/**
|
|
118
|
+
* 错误
|
|
119
|
+
*/
|
|
120
|
+
error = "\u9519\u8BEF",
|
|
121
|
+
/**
|
|
122
|
+
* 警告
|
|
123
|
+
*/
|
|
124
|
+
warning = "\u8B66\u544A"
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @description: 关联类型
|
|
128
|
+
*/
|
|
129
|
+
export declare enum relevanceType {
|
|
130
|
+
/**
|
|
131
|
+
* 自动选择
|
|
132
|
+
*/
|
|
133
|
+
autoSelect = "\u81EA\u52A8\u9009\u62E9",
|
|
134
|
+
/**
|
|
135
|
+
* 自动取消
|
|
136
|
+
*/
|
|
137
|
+
autoCancel = "\u81EA\u52A8\u53D6\u6D88"
|
|
138
|
+
}
|