@hzab/form-render 1.6.17 → 1.6.19
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/CHANGELOG.md +291 -283
- package/README.md +239 -239
- package/package.json +57 -57
- package/src/common/formily-utils.ts +125 -125
- package/src/common/schema-handler.ts +253 -253
- package/src/common/schema-merge.ts +68 -68
- package/src/components/ArrayBase/index.tsx +349 -349
- package/src/components/ArrayBase/style.less +90 -90
- package/src/components/ArrayBase/style.ts +2 -2
- package/src/components/ArrayCards/index.tsx +149 -149
- package/src/components/ArrayCards/style.less +14 -14
- package/src/components/ArrayCards/style.ts +4 -4
- package/src/components/ArrayTable/index.tsx +411 -411
- package/src/components/ArrayTable/style.less +52 -52
- package/src/components/ArrayTable/style.ts +7 -7
- package/src/components/DatePicker/index.tsx +108 -108
- package/src/components/LocationListPicker/assets/icon.js +1 -1
- package/src/components/LocationListPicker/components/AddrList/index.less +55 -55
- package/src/components/LocationListPicker/components/AddrList/index.tsx +75 -75
- package/src/components/LocationListPicker/components/Popup/address.schema.json +21 -21
- package/src/components/LocationListPicker/components/Popup/index.less +22 -22
- package/src/components/LocationListPicker/components/Popup/index.tsx +92 -92
- package/src/components/LocationListPicker/index.less +34 -34
- package/src/components/LocationListPicker/index.tsx +521 -520
- package/src/components/LocationPicker/Map/AMap/common/loader.ts +58 -58
- package/src/components/LocationPicker/Map/AMap/common/utils.ts +431 -431
- package/src/components/LocationPicker/Map/AMap/index.jsx +51 -51
- package/src/components/LocationPicker/README.md +44 -44
- package/src/components/LocationPicker/common/utils.ts +30 -30
- package/src/components/LocationPicker/components/ModalContent/index.tsx +387 -387
- package/src/components/LocationPicker/components/PickerInfo/index.tsx +109 -109
- package/src/components/LocationPicker/components/ResInfo/index.less +38 -38
- package/src/components/LocationPicker/components/ResInfo/index.tsx +65 -65
- package/src/components/LocationPicker/index.tsx +197 -197
- package/src/components/PersonnelSelect/index.less +21 -21
- package/src/components/PersonnelSelect/index.module.less +33 -33
- package/src/components/PersonnelSelect/index.tsx +305 -300
- package/src/components/PersonnelSelect/type.ts +92 -92
- package/src/components/RichEditor/index.less +38 -38
- package/src/components/RichEditor/index.tsx +238 -238
- package/src/components/TreeCheckbox/components/CheckboxTable/index.tsx +55 -55
- package/src/components/TreeCheckbox/components/TabsRender/index.tsx +58 -58
- package/src/components/TreeCheckbox/index.less +12 -12
- package/src/components/TreeCheckbox/index.tsx +63 -63
- package/src/components/Upload/README.md +64 -64
- package/src/components/Upload/common/OfflineUpload.ts +339 -339
- package/src/components/Upload/common/customRequest.ts +81 -81
- package/src/components/Upload/common/fileName.ts +142 -142
- package/src/components/Upload/common/handleIOFileList.ts +393 -393
- package/src/components/Upload/common/nanoid.ts +7 -7
- package/src/components/Upload/common/ossUpload.js +159 -159
- package/src/components/Upload/common/utils.js +194 -194
- package/src/components/Upload/components/ItemList/index.tsx +52 -52
- package/src/components/Upload/components/PreviewModal/previewRender.tsx +80 -80
- package/src/components/Upload/index.tsx +17 -17
- package/src/components/Upload/uploader-input.jsx +187 -187
- package/src/components/Upload/uploader.jsx +316 -316
- package/src/components/UserSelect/index.tsx +123 -123
- package/src/components/index.tsx +17 -17
- package/src/index.tsx +198 -198
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import type { SelectProps } from "antd/lib/select";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import type { AvatarProps } from "antd/lib/avatar";
|
|
4
|
-
|
|
5
|
-
export interface ScrollPagination {
|
|
6
|
-
pageNum: number;
|
|
7
|
-
pageSize: number;
|
|
8
|
-
current?: number;
|
|
9
|
-
hasMore?: boolean;
|
|
10
|
-
total?: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type LabelValue = {
|
|
14
|
-
label: string;
|
|
15
|
-
value: string | number;
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
interface BaseSelectProps extends Omit<SelectProps<any>, "options" | "children"> {
|
|
20
|
-
/**
|
|
21
|
-
* @title 请求函数
|
|
22
|
-
* */
|
|
23
|
-
loadData: (
|
|
24
|
-
search: string,
|
|
25
|
-
pagination: ScrollPagination,
|
|
26
|
-
) => Promise<{ list: LabelValue[]; pagination: ScrollPagination }>;
|
|
27
|
-
/**
|
|
28
|
-
* @title 查询函数
|
|
29
|
-
* */
|
|
30
|
-
searchData?: <T = Record<string, any>, U = any[]>(query: T) => Promise<U[]>;
|
|
31
|
-
/**
|
|
32
|
-
* @title 自定义列表项
|
|
33
|
-
* */
|
|
34
|
-
renderItem?: (item: LabelValue) => React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* @title 下拉框收起时是否清除数据
|
|
37
|
-
* */
|
|
38
|
-
isClearable?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* @title 分页参数
|
|
41
|
-
* */
|
|
42
|
-
initialPagination?: Partial<ScrollPagination>;
|
|
43
|
-
/**
|
|
44
|
-
* @title antd头像组件props
|
|
45
|
-
* */
|
|
46
|
-
avataProps?: AvatarProps;
|
|
47
|
-
mode: "multiple" | "tags";
|
|
48
|
-
/**
|
|
49
|
-
* @title 列表项内部展示的字段内容
|
|
50
|
-
* */
|
|
51
|
-
listItemConfigs?: { label: string; key: string }[];
|
|
52
|
-
/**
|
|
53
|
-
* @title 动态disabledKey
|
|
54
|
-
* */
|
|
55
|
-
disabledKey?: string;
|
|
56
|
-
/**
|
|
57
|
-
* @title 动态labelKey
|
|
58
|
-
* */
|
|
59
|
-
labelKey?: string;
|
|
60
|
-
/**
|
|
61
|
-
* @title 动态valueKey
|
|
62
|
-
* */
|
|
63
|
-
valueKey?: string;
|
|
64
|
-
/**
|
|
65
|
-
* @title disabledStyle
|
|
66
|
-
* */
|
|
67
|
-
disabledStyle?: (disabled: boolean) => React.CSSProperties;
|
|
68
|
-
/**
|
|
69
|
-
* @title 自定义列表项中的样式
|
|
70
|
-
* */
|
|
71
|
-
customItemNode?: React.ReactNode;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// 多选模式
|
|
75
|
-
export interface RemoteSelectMultipleProps extends BaseSelectProps {
|
|
76
|
-
mode: "multiple";
|
|
77
|
-
/**
|
|
78
|
-
* @title 下拉框值
|
|
79
|
-
* */
|
|
80
|
-
value?: LabelValue[] | Array<string | number>;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// 单选模式
|
|
84
|
-
export interface RemoteSelectTagsProps extends BaseSelectProps {
|
|
85
|
-
mode: "tags";
|
|
86
|
-
/**
|
|
87
|
-
* @title 下拉框值
|
|
88
|
-
* */
|
|
89
|
-
value?: LabelValue | string | number;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export type RemoteSelectProps = RemoteSelectMultipleProps | RemoteSelectTagsProps;
|
|
1
|
+
import type { SelectProps } from "antd/lib/select";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { AvatarProps } from "antd/lib/avatar";
|
|
4
|
+
|
|
5
|
+
export interface ScrollPagination {
|
|
6
|
+
pageNum: number;
|
|
7
|
+
pageSize: number;
|
|
8
|
+
current?: number;
|
|
9
|
+
hasMore?: boolean;
|
|
10
|
+
total?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type LabelValue = {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string | number;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
interface BaseSelectProps extends Omit<SelectProps<any>, "options" | "children"> {
|
|
20
|
+
/**
|
|
21
|
+
* @title 请求函数
|
|
22
|
+
* */
|
|
23
|
+
loadData: (
|
|
24
|
+
search: string,
|
|
25
|
+
pagination: ScrollPagination,
|
|
26
|
+
) => Promise<{ list: LabelValue[]; pagination: ScrollPagination }>;
|
|
27
|
+
/**
|
|
28
|
+
* @title 查询函数
|
|
29
|
+
* */
|
|
30
|
+
searchData?: <T = Record<string, any>, U = any[]>(query: T) => Promise<U[]>;
|
|
31
|
+
/**
|
|
32
|
+
* @title 自定义列表项
|
|
33
|
+
* */
|
|
34
|
+
renderItem?: (item: LabelValue) => React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* @title 下拉框收起时是否清除数据
|
|
37
|
+
* */
|
|
38
|
+
isClearable?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @title 分页参数
|
|
41
|
+
* */
|
|
42
|
+
initialPagination?: Partial<ScrollPagination>;
|
|
43
|
+
/**
|
|
44
|
+
* @title antd头像组件props
|
|
45
|
+
* */
|
|
46
|
+
avataProps?: AvatarProps;
|
|
47
|
+
mode: "multiple" | "tags";
|
|
48
|
+
/**
|
|
49
|
+
* @title 列表项内部展示的字段内容
|
|
50
|
+
* */
|
|
51
|
+
listItemConfigs?: { label: string; key: string }[];
|
|
52
|
+
/**
|
|
53
|
+
* @title 动态disabledKey
|
|
54
|
+
* */
|
|
55
|
+
disabledKey?: string;
|
|
56
|
+
/**
|
|
57
|
+
* @title 动态labelKey
|
|
58
|
+
* */
|
|
59
|
+
labelKey?: string;
|
|
60
|
+
/**
|
|
61
|
+
* @title 动态valueKey
|
|
62
|
+
* */
|
|
63
|
+
valueKey?: string;
|
|
64
|
+
/**
|
|
65
|
+
* @title disabledStyle
|
|
66
|
+
* */
|
|
67
|
+
disabledStyle?: (disabled: boolean) => React.CSSProperties;
|
|
68
|
+
/**
|
|
69
|
+
* @title 自定义列表项中的样式
|
|
70
|
+
* */
|
|
71
|
+
customItemNode?: React.ReactNode;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// 多选模式
|
|
75
|
+
export interface RemoteSelectMultipleProps extends BaseSelectProps {
|
|
76
|
+
mode: "multiple";
|
|
77
|
+
/**
|
|
78
|
+
* @title 下拉框值
|
|
79
|
+
* */
|
|
80
|
+
value?: LabelValue[] | Array<string | number>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 单选模式
|
|
84
|
+
export interface RemoteSelectTagsProps extends BaseSelectProps {
|
|
85
|
+
mode: "tags";
|
|
86
|
+
/**
|
|
87
|
+
* @title 下拉框值
|
|
88
|
+
* */
|
|
89
|
+
value?: LabelValue | string | number;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type RemoteSelectProps = RemoteSelectMultipleProps | RemoteSelectTagsProps;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
.wang-editor-warpper {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
height: 100%;
|
|
5
|
-
position: relative;
|
|
6
|
-
|
|
7
|
-
.spin-content {
|
|
8
|
-
position: absolute;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
z-index: 1000;
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
background: rgba(255, 255, 255, .6);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.wang-editor-container {
|
|
21
|
-
flex: 1;
|
|
22
|
-
width: 100%;
|
|
23
|
-
position: relative;
|
|
24
|
-
|
|
25
|
-
.wang-editor-scroll {
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
bottom: 0;
|
|
30
|
-
right: 0;
|
|
31
|
-
overflow-x: hidden;
|
|
32
|
-
overflow-y: scroll;
|
|
33
|
-
|
|
34
|
-
.w-e-text-container {
|
|
35
|
-
min-height: 100%;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
.wang-editor-warpper {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
position: relative;
|
|
6
|
+
|
|
7
|
+
.spin-content {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
z-index: 1000;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
background: rgba(255, 255, 255, .6);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.wang-editor-container {
|
|
21
|
+
flex: 1;
|
|
22
|
+
width: 100%;
|
|
23
|
+
position: relative;
|
|
24
|
+
|
|
25
|
+
.wang-editor-scroll {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
bottom: 0;
|
|
30
|
+
right: 0;
|
|
31
|
+
overflow-x: hidden;
|
|
32
|
+
overflow-y: scroll;
|
|
33
|
+
|
|
34
|
+
.w-e-text-container {
|
|
35
|
+
min-height: 100%;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
39
|
}
|