zhytech-ui 1.0.8 → 1.0.9

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
@@ -21,7 +21,7 @@ npm i zhytech-ui@latest -S
21
21
  ##### 2、引入使用
22
22
  1)、按需引入:在要使用的页面添加下面代码即可
23
23
  ```ts
24
- import { dynamicFormData,dynamicFilter } from "zhytech-ui"
24
+ import { ZhyFormDesigner, ZhyFormRenderer } from "zhytech-ui"
25
25
  ```
26
26
  2)、全局引入:在项目内任何页面都不需要单独引入
27
27
  ```ts
@@ -30,8 +30,15 @@ import "../node_modules/zhytech-ui/dist/style.css";
30
30
  createApp(app).use(zhytechUI)
31
31
  ```
32
32
 
33
- **注意:此组件css样式依赖scss开发,使用者项目还需要添加scss依赖**
33
+ ##### 2、使用组件
34
+ ```html
35
+ <zhy-form-designer :formData="formData"></zhy-form-designer>
36
+ ```
37
+
38
+ > #### 注意:
39
+ 1)、此组件库提供的所有组件在使用时均需要添加**zhy**前缀,如:zhy-form-designer
40
+ 2)、此组件css样式依赖scss开发,使用者项目还需要添加scss依赖。
34
41
 
35
42
 
36
43
  > #### 后续计划:
37
- 此组件还是一个雏形,后续会继续添加组件
44
+ 此组件库目前还处于雏形,后续会继续添加组件
@@ -0,0 +1,4 @@
1
+ import { default as dynamicFilter } from './index.vue';
2
+ export { dynamicFilter };
3
+ export type { conditionType };
4
+ type conditionType = keyof typeof filterConditionTypes;
@@ -0,0 +1,67 @@
1
+ type conditionType = keyof typeof filterConditionTypes;
2
+ export default class baseComponent {
3
+ /**
4
+ * @description: 是否为编辑类组件
5
+ */
6
+ isEdit: boolean;
7
+ /**
8
+ * @description: 是否为输入型编辑类组件
9
+ */
10
+ isInput: boolean;
11
+ /**
12
+ * @description: 类型
13
+ */
14
+ type: string;
15
+ /**
16
+ * @description: 名称
17
+ */
18
+ name: string;
19
+ /**
20
+ * @description: 组件唯一标识
21
+ */
22
+ id: string;
23
+ /**
24
+ * @description: 业务字典项目编号
25
+ */
26
+ itemID?: string;
27
+ /**
28
+ * @description: 业务字典项目来源
29
+ */
30
+ itemSourceType?: string;
31
+ /**
32
+ * @description: 组件校验条件
33
+ */
34
+ rules: Record<string, any>[];
35
+ /**
36
+ * @description: 组件属性
37
+ */
38
+ props: Record<string, any>;
39
+ /**
40
+ * @description: 组件要排除的过滤条件集合
41
+ * 参数说明:EQUALS:等于; NOT_EQUALS:不等于; GREATER_THAN:大于; LESS_THAN:小于;
42
+ * GREATER_THAN_OR_EQUALS:大于等于; LESS_THAN_OR_EQUALS:小于等于;
43
+ * EMPTY:为空; INCLUDES:包含; EXCLUDE:不包含; RANGE:范围
44
+ */
45
+ excludeFilterConditions: conditionType[];
46
+ /**
47
+ * @description: 组件过滤参数
48
+ */
49
+ filterConditionProps: Record<string, any> | undefined;
50
+ /**
51
+ * @description: 是否为布局组件
52
+ */
53
+ isLayout: boolean;
54
+ /**
55
+ * @description:布局组件的子组件集合
56
+ */
57
+ children: Record<string, any>[] | undefined;
58
+ /**
59
+ * @description: 构造器
60
+ * @param type 组件类型
61
+ * @param name 组件名称
62
+ * @param isEdit 是否为编辑类组件,默认为false
63
+ * @param isInput 是否为输入型编辑类组件,默认为false
64
+ */
65
+ constructor(type: string, name: string, isEdit?: boolean, isInput?: boolean);
66
+ }
67
+ export {};
@@ -0,0 +1,2 @@
1
+ import { default as icon } from './index.vue';
2
+ export { icon };
@@ -0,0 +1,31 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ name: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ size: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ color: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
15
+ name: {
16
+ type: StringConstructor;
17
+ required: true;
18
+ };
19
+ size: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ color: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ }>>, {
28
+ color: string;
29
+ size: string;
30
+ }, {}>;
31
+ export default _default;
@@ -1,7 +1,8 @@
1
- import { conditionType, dynamicFilter } from './components/dynamicFilter/index';
2
- import { batchAddComponentParam, documentView, dynamicFormData, formAttribute, GetFormTemplateMethod, uploadOption, formDesigner, formRenderer } from './components/dynamicForm/index';
1
+ import { conditionType, dynamicFilter as ZhyDynamicFilter } from './components/dynamicFilter/index';
2
+ import { batchAddComponentParam, documentView, dynamicFormData, formAttribute, GetFormTemplateMethod, uploadOption, formDesigner as ZhyFormDesigner, formRenderer as ZhyFormRenderer } from './components/dynamicForm/index';
3
+ import { icon as ZhyIcon } from './components/icon/index';
3
4
  export type { conditionType, dynamicFormData, formAttribute, uploadOption, documentView, batchAddComponentParam, GetFormTemplateMethod };
4
- export { formDesigner, formRenderer, dynamicFilter };
5
+ export { ZhyIcon, ZhyFormDesigner, ZhyFormRenderer, ZhyDynamicFilter };
5
6
  declare const _default: {
6
7
  install: (app: any, options?: Record<string, any> | undefined) => void;
7
8
  };
@@ -1,28 +1,28 @@
1
1
  /**
2
2
  * 消息类型
3
3
  */
4
- export declare enum MessageType {
4
+ declare enum MessageType {
5
5
  /**
6
6
  * 成功消息
7
7
  */
8
- success = 0,
8
+ success,
9
9
  /**
10
10
  * 警告消息
11
11
  */
12
- warning = 1,
12
+ warning,
13
13
  /**
14
14
  * 错误消息
15
15
  */
16
- error = 2,
16
+ error,
17
17
  /**
18
18
  * 普通消息
19
19
  */
20
- info = 3
20
+ info
21
21
  }
22
22
  /**
23
23
  * 过滤条件组件类型
24
24
  */
25
- export declare enum filterConditionTypes {
25
+ declare enum filterConditionTypes {
26
26
  /**
27
27
  * 等于=
28
28
  */
@@ -0,0 +1,34 @@
1
+ type MType = keyof typeof MessageType;
2
+ /**
3
+ * @description: 提示信息
4
+ * @param type 类型
5
+ * @param message 消息内容
6
+ * @return
7
+ */
8
+ export declare const showMessage: (type: MType, message: string) => void;
9
+ /**
10
+ * @description: 弹窗
11
+ * @param type 类型
12
+ * @param message 消息内容
13
+ * @param title 消息标题
14
+ * @param btnName 按钮显示文字
15
+ * @return
16
+ */
17
+ export declare const showAlert: (type: MType, message: string, title?: string, btnName?: string) => Promise<import('element-plus').MessageBoxData>;
18
+ /**
19
+ * @description: 确认弹窗
20
+ * @param message 消息内容
21
+ * @param title 消息标题
22
+ * @param callback 回调函数
23
+ * @param btnName 按钮显示文字
24
+ * @return
25
+ */
26
+ export declare const confirmBox: (message: string, title: string, callback?: Function, btnName?: string) => Promise<void>;
27
+ /**
28
+ * @description: 删除确认框
29
+ * @param message 消息内容
30
+ * @param callback 回调韩式
31
+ * @return
32
+ */
33
+ export declare const deleteConfirm: (message: string, callback: Function) => Promise<void>;
34
+ export {};