zy-react-library 1.1.0 → 1.1.2
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 +5 -1
- package/components/Cascader/Area/index.js +11 -11
- package/components/Cascader/Basic/index.js +23 -30
- package/components/Cascader/Dictionary/index.js +42 -42
- package/components/Cascader/Industry/index.js +12 -11
- package/components/Editor/index.js +43 -63
- package/components/FormBuilder/FormBuilder.js +97 -87
- package/components/FormBuilder/FormItemsRenderer.js +579 -581
- package/components/FormBuilder/index.js +5 -3
- package/components/HeaderBack/index.js +39 -32
- package/components/HiddenInfo/gwj/index.js +507 -439
- package/components/Icon/AddIcon/index.js +6 -6
- package/components/Icon/BackIcon/index.js +6 -6
- package/components/Icon/DeleteIcon/index.js +6 -6
- package/components/Icon/DownloadIcon/index.js +6 -6
- package/components/Icon/EditIcon/index.js +6 -6
- package/components/Icon/ExportIcon/index.js +6 -6
- package/components/Icon/ImportIcon/index.js +6 -6
- package/components/Icon/LocationIcon/index.js +6 -6
- package/components/Icon/PrintIcon/index.js +6 -6
- package/components/Icon/ResetIcon/index.js +6 -6
- package/components/Icon/SearchIcon/index.js +6 -6
- package/components/Icon/VideoIcon/index.js +6 -6
- package/components/Icon/ViewIcon/index.js +6 -6
- package/components/ImportFile/index.js +94 -91
- package/components/LeftTree/Area/index.js +15 -15
- package/components/LeftTree/Basic/index.js +54 -65
- package/components/LeftTree/Department/Gwj/index.js +29 -32
- package/components/LeftTree/Dictionary/index.js +42 -42
- package/components/Map/MapSelector.js +280 -254
- package/components/Map/index.js +90 -77
- package/components/Page/index.d.ts +2 -0
- package/components/Page/index.js +44 -34
- package/components/Pdf/index.js +92 -90
- package/components/PreviewImg/index.js +26 -32
- package/components/PreviewPdf/index.js +78 -86
- package/components/Search/index.js +147 -141
- package/components/Select/Basic/index.js +70 -76
- package/components/Select/Dictionary/index.js +42 -42
- package/components/Select/Personnel/Gwj/index.js +45 -49
- package/components/SelectCreate/index.js +33 -40
- package/components/SelectTree/Area/index.js +11 -17
- package/components/SelectTree/Basic/index.js +105 -102
- package/components/SelectTree/Department/Gwj/index.js +40 -46
- package/components/SelectTree/Dictionary/index.js +42 -42
- package/components/SelectTree/HiddenLevel/Gwj/index.js +33 -35
- package/components/SelectTree/HiddenPart/Gwj/index.js +16 -19
- package/components/SelectTree/Industry/index.js +12 -18
- package/components/Signature/index.js +68 -62
- package/components/Table/index.js +77 -73
- package/components/Table/index.less +7 -1
- package/components/TooltipPreviewImg/index.js +28 -27
- package/components/Upload/index.js +229 -275
- package/components/Video/AliPlayer.js +182 -160
- package/components/Video/index.js +71 -90
- package/css/common.less +4 -0
- package/enum/dictionary/index.js +5 -3
- package/enum/formItemRender/index.js +37 -35
- package/enum/hidden/gwj/index.js +65 -26
- package/enum/uploadFile/gwj/index.js +166 -84
- package/hooks/useDeleteFile/index.js +24 -30
- package/hooks/useDictionary/index.js +28 -30
- package/hooks/useDownloadBlob/index.js +78 -77
- package/hooks/useDownloadFile/index.js +76 -79
- package/hooks/useGetFile/index.js +32 -32
- package/hooks/useGetUrlQuery/index.js +1 -2
- package/hooks/useGetUserInfo/index.js +19 -26
- package/hooks/useIdle/index.js +9 -11
- package/hooks/useImportFile/index.js +30 -28
- package/hooks/useIsExistenceDuplicateSelection/index.js +25 -18
- package/hooks/useTable/index.js +49 -38
- package/hooks/useUploadFile/index.js +142 -147
- package/hooks/useUrlQueryCriteria/index.js +20 -13
- package/package.json +14 -1
- package/regular/index.js +34 -39
- package/utils/index.js +515 -511
package/README.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import Area from
|
|
2
|
-
import BasicCascader from
|
|
1
|
+
import Area from '../../../json/area.json';
|
|
2
|
+
import BasicCascader from '../Basic/index.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
* 属地级联组件
|
|
6
|
-
*/
|
|
7
5
|
function AreaCascader(props) {
|
|
8
6
|
const {
|
|
9
7
|
placeholder = "属地",
|
|
10
8
|
...restProps
|
|
11
9
|
} = props;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
return /*#__PURE__*/jsx(BasicCascader, {
|
|
11
|
+
data: Area,
|
|
12
|
+
placeholder: placeholder,
|
|
13
|
+
nameKey: "label",
|
|
14
|
+
idKey: "value",
|
|
15
|
+
...restProps
|
|
16
|
+
});
|
|
16
17
|
}
|
|
17
|
-
|
|
18
18
|
AreaCascader.displayName = "AreaCascader";
|
|
19
19
|
|
|
20
|
-
export default
|
|
20
|
+
export { AreaCascader as default };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Cascader } from
|
|
2
|
-
import { useEffect } from
|
|
3
|
-
import { processTreeDataByLevel } from
|
|
1
|
+
import { Cascader } from 'antd';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { processTreeDataByLevel } from '../../../utils/index.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* 基础级联组件(不建议直接使用此组件,二次继承使用)
|
|
7
|
-
*/
|
|
8
6
|
function BasicCascader(props) {
|
|
9
7
|
const {
|
|
10
8
|
onGetData,
|
|
@@ -21,44 +19,39 @@ function BasicCascader(props) {
|
|
|
21
19
|
} = props;
|
|
22
20
|
|
|
23
21
|
// 根据 level 处理树数据
|
|
24
|
-
const processedData = level
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
: data;
|
|
32
|
-
|
|
33
|
-
const getNodePaths = (selectedOptions) => {
|
|
22
|
+
const processedData = level ? processTreeDataByLevel({
|
|
23
|
+
data,
|
|
24
|
+
level,
|
|
25
|
+
childrenKey,
|
|
26
|
+
currentLevel: 1
|
|
27
|
+
}) : data;
|
|
28
|
+
const getNodePaths = selectedOptions => {
|
|
34
29
|
let nodePaths = selectedOptions;
|
|
35
30
|
if (!onGetNodePathsIsIncludeOneself && selectedOptions) {
|
|
36
31
|
nodePaths = selectedOptions.slice(0, -1);
|
|
37
32
|
}
|
|
38
33
|
return nodePaths || [];
|
|
39
34
|
};
|
|
40
|
-
|
|
41
35
|
const handleChange = (value, selectedOptions) => {
|
|
42
36
|
const parentNodes = getNodePaths(selectedOptions);
|
|
43
37
|
onGetNodePaths?.(parentNodes);
|
|
44
38
|
onChange?.(value, selectedOptions);
|
|
45
39
|
};
|
|
46
|
-
|
|
47
40
|
useEffect(() => {
|
|
48
41
|
onGetData?.(data, processedData);
|
|
49
42
|
}, [data, processedData]);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
return /*#__PURE__*/jsx(Cascader, {
|
|
44
|
+
options: processedData,
|
|
45
|
+
placeholder: `请选择${placeholder}`,
|
|
46
|
+
onChange: handleChange,
|
|
47
|
+
fieldNames: {
|
|
48
|
+
label: nameKey,
|
|
49
|
+
value: idKey,
|
|
50
|
+
children: childrenKey
|
|
51
|
+
},
|
|
52
|
+
...restProps
|
|
53
|
+
});
|
|
60
54
|
}
|
|
61
|
-
|
|
62
55
|
BasicCascader.displayName = "BasicCascader";
|
|
63
56
|
|
|
64
|
-
export default
|
|
57
|
+
export { BasicCascader as default };
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { request } from
|
|
2
|
-
import {
|
|
3
|
-
import { DICTIONARY_APP_KEY_ENUM } from
|
|
4
|
-
import BasicCascader from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
setTreeData(data);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
DictionaryCascader.displayName = "DictionaryCascader";
|
|
41
|
-
|
|
42
|
-
export default
|
|
1
|
+
import { request } from '@cqsjjb/jjb-common-lib/http';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { DICTIONARY_APP_KEY_ENUM } from '../../../enum/dictionary/index.js';
|
|
4
|
+
import BasicCascader from '../Basic/index.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function DictionaryCascader(props) {
|
|
8
|
+
const {
|
|
9
|
+
appKey = DICTIONARY_APP_KEY_ENUM.DEFAULT,
|
|
10
|
+
dictValue = "",
|
|
11
|
+
nameKey = "dictLabel",
|
|
12
|
+
idKey = "dictValue",
|
|
13
|
+
...restProps
|
|
14
|
+
} = props;
|
|
15
|
+
const [treeData, setTreeData] = useState([]);
|
|
16
|
+
const getData = async () => {
|
|
17
|
+
if (!Object.values(DICTIONARY_APP_KEY_ENUM).includes(appKey)) {
|
|
18
|
+
console.error("传入的 appKey 不在 DICTIONARY_APP_KEY_ENUM 中");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
setTreeData([]);
|
|
22
|
+
const {
|
|
23
|
+
data
|
|
24
|
+
} = await request("/config/dict-trees/list/by/dictValues", "get", {
|
|
25
|
+
appKey,
|
|
26
|
+
dictValue
|
|
27
|
+
});
|
|
28
|
+
setTreeData(data);
|
|
29
|
+
};
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
dictValue && getData();
|
|
32
|
+
}, [dictValue]);
|
|
33
|
+
return /*#__PURE__*/jsx(BasicCascader, {
|
|
34
|
+
data: treeData,
|
|
35
|
+
nameKey: nameKey,
|
|
36
|
+
idKey: idKey,
|
|
37
|
+
...restProps
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
DictionaryCascader.displayName = "DictionaryCascader";
|
|
41
|
+
|
|
42
|
+
export { DictionaryCascader as default };
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import Industry from
|
|
2
|
-
import BasicCascader from
|
|
1
|
+
import Industry from '../../../json/industry.json';
|
|
2
|
+
import BasicCascader from '../Basic/index.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
* 行业类型级联组件
|
|
6
|
-
*/
|
|
7
5
|
function IndustryCascader(props) {
|
|
8
6
|
const {
|
|
9
7
|
placeholder = "行业类型",
|
|
10
8
|
...restProps
|
|
11
9
|
} = props;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
return /*#__PURE__*/jsx(BasicCascader, {
|
|
11
|
+
data: Industry,
|
|
12
|
+
placeholder: placeholder,
|
|
13
|
+
nameKey: "dict_label",
|
|
14
|
+
idKey: "dict_value",
|
|
15
|
+
childrenKey: "childrenList",
|
|
16
|
+
...restProps
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
|
-
|
|
18
19
|
IndustryCascader.displayName = "IndustryCascader";
|
|
19
20
|
|
|
20
|
-
export default
|
|
21
|
+
export { IndustryCascader as default };
|
|
@@ -1,102 +1,82 @@
|
|
|
1
|
-
import { Editor as
|
|
2
|
-
import { forwardRef, useEffect, useImperativeHandle
|
|
3
|
-
import { normalizeEmptyHtml } from
|
|
4
|
-
import
|
|
1
|
+
import { Toolbar, Editor as Editor$1 } from '@wangeditor/editor-for-react';
|
|
2
|
+
import { forwardRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
3
|
+
import { normalizeEmptyHtml } from '../../utils/index.js';
|
|
4
|
+
import '@wangeditor/editor/dist/css/style.css';
|
|
5
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
* 富文本编辑器组件
|
|
8
|
-
*/
|
|
9
|
-
const Editor = forwardRef(({
|
|
7
|
+
const Editor = /*#__PURE__*/forwardRef(({
|
|
10
8
|
value,
|
|
11
9
|
onChange,
|
|
12
|
-
disabled
|
|
10
|
+
disabled
|
|
13
11
|
}, ref) => {
|
|
14
12
|
const [editor, setEditor] = useState(null);
|
|
15
|
-
|
|
16
13
|
const [html, setHtml] = useState("");
|
|
17
|
-
|
|
18
14
|
useEffect(() => {
|
|
19
15
|
setHtml(value);
|
|
20
16
|
}, [value]);
|
|
21
|
-
|
|
22
17
|
useEffect(() => {
|
|
23
|
-
if (!editor)
|
|
24
|
-
|
|
25
|
-
if (disabled)
|
|
26
|
-
editor.disable();
|
|
27
|
-
else editor.enable();
|
|
18
|
+
if (!editor) return;
|
|
19
|
+
if (disabled) editor.disable();else editor.enable();
|
|
28
20
|
}, [disabled]);
|
|
29
|
-
|
|
30
21
|
useEffect(() => {
|
|
31
22
|
return () => {
|
|
32
|
-
if (!editor)
|
|
33
|
-
return;
|
|
23
|
+
if (!editor) return;
|
|
34
24
|
editor.destroy();
|
|
35
25
|
setEditor(null);
|
|
36
26
|
};
|
|
37
27
|
}, [editor]);
|
|
38
|
-
|
|
39
28
|
useImperativeHandle(ref, () => ({
|
|
40
29
|
getEditorInstance: () => editor,
|
|
41
30
|
getHtml: () => editor && editor.getHtml(),
|
|
42
|
-
setHtml:
|
|
31
|
+
setHtml: value => {
|
|
43
32
|
editor && editor.setHtml(value);
|
|
44
33
|
},
|
|
45
|
-
getText: () => editor && editor.getText()
|
|
34
|
+
getText: () => editor && editor.getText()
|
|
46
35
|
}));
|
|
47
|
-
|
|
48
|
-
const handleCreated = (editor) => {
|
|
36
|
+
const handleCreated = editor => {
|
|
49
37
|
setEditor(editor);
|
|
50
|
-
if (disabled)
|
|
51
|
-
editor.disable();
|
|
38
|
+
if (disabled) editor.disable();
|
|
52
39
|
};
|
|
53
|
-
|
|
54
|
-
const handleChange = (editor) => {
|
|
40
|
+
const handleChange = editor => {
|
|
55
41
|
setHtml(editor.getHtml());
|
|
56
42
|
onChange?.(normalizeEmptyHtml(editor.getHtml()));
|
|
57
43
|
};
|
|
58
44
|
|
|
59
45
|
// 工具栏配置
|
|
60
46
|
const toolbarConfig = {
|
|
61
|
-
excludeKeys: [
|
|
62
|
-
"group-image",
|
|
63
|
-
"group-video",
|
|
64
|
-
"insertLink",
|
|
65
|
-
"emotion",
|
|
66
|
-
"todo",
|
|
67
|
-
"fullScreen",
|
|
68
|
-
"insertTable",
|
|
69
|
-
"codeBlock",
|
|
70
|
-
],
|
|
47
|
+
excludeKeys: ["group-image", "group-video", "insertLink", "emotion", "todo", "fullScreen", "insertTable", "codeBlock"]
|
|
71
48
|
};
|
|
72
49
|
|
|
73
50
|
// 编辑器配置
|
|
74
51
|
const editorConfig = {
|
|
75
|
-
placeholder: "请输入内容..."
|
|
52
|
+
placeholder: "请输入内容..."
|
|
76
53
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
54
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
55
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
56
|
+
style: {
|
|
57
|
+
border: "1px solid #ccc"
|
|
58
|
+
},
|
|
59
|
+
children: [/*#__PURE__*/jsx(Toolbar, {
|
|
60
|
+
editor: editor,
|
|
61
|
+
defaultConfig: toolbarConfig,
|
|
62
|
+
mode: "default",
|
|
63
|
+
style: {
|
|
64
|
+
borderBottom: "1px solid #ccc"
|
|
65
|
+
}
|
|
66
|
+
}), /*#__PURE__*/jsx(Editor$1, {
|
|
67
|
+
defaultConfig: editorConfig,
|
|
68
|
+
value: html,
|
|
69
|
+
onCreated: handleCreated,
|
|
70
|
+
onChange: handleChange,
|
|
71
|
+
mode: "default",
|
|
72
|
+
style: {
|
|
73
|
+
height: "500px",
|
|
74
|
+
overflowY: "hidden"
|
|
75
|
+
}
|
|
76
|
+
})]
|
|
77
|
+
})
|
|
78
|
+
});
|
|
98
79
|
});
|
|
99
|
-
|
|
100
80
|
Editor.displayName = "Editor";
|
|
101
81
|
|
|
102
|
-
export default
|
|
82
|
+
export { Editor as default };
|
|
@@ -1,87 +1,97 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import FormItemsRenderer from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
useAutoGenerateRequired = true,
|
|
15
|
-
showActionButtons = true,
|
|
16
|
-
submitButtonText = "提交",
|
|
17
|
-
cancelButtonText = "取消",
|
|
18
|
-
showSubmitButton = true,
|
|
19
|
-
showCancelButton = true,
|
|
20
|
-
customActionButtons,
|
|
21
|
-
extraActionButtons,
|
|
22
|
-
loading = false,
|
|
23
|
-
...restProps
|
|
24
|
-
} = props;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
import { Spin, Form, Row, Col, Space, Button, message } from 'antd';
|
|
2
|
+
import FormItemsRenderer from './FormItemsRenderer.js';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const FormBuilder = props => {
|
|
6
|
+
const {
|
|
7
|
+
values,
|
|
8
|
+
options,
|
|
9
|
+
gutter = 24,
|
|
10
|
+
span = 12,
|
|
11
|
+
labelCol = {
|
|
12
|
+
span: 4
|
|
13
|
+
},
|
|
14
|
+
useAutoGenerateRequired = true,
|
|
15
|
+
showActionButtons = true,
|
|
16
|
+
submitButtonText = "提交",
|
|
17
|
+
cancelButtonText = "取消",
|
|
18
|
+
showSubmitButton = true,
|
|
19
|
+
showCancelButton = true,
|
|
20
|
+
customActionButtons,
|
|
21
|
+
extraActionButtons,
|
|
22
|
+
loading = false,
|
|
23
|
+
...restProps
|
|
24
|
+
} = props;
|
|
25
|
+
const handleCancel = () => {
|
|
26
|
+
window.history.back();
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/jsx(Spin, {
|
|
29
|
+
spinning: loading,
|
|
30
|
+
children: /*#__PURE__*/jsxs(Form, {
|
|
31
|
+
labelCol: labelCol,
|
|
32
|
+
scrollToFirstError: true,
|
|
33
|
+
wrapperCol: {
|
|
34
|
+
span: 24 - labelCol.span
|
|
35
|
+
},
|
|
36
|
+
initialValues: values,
|
|
37
|
+
onFinishFailed: () => {
|
|
38
|
+
message.error("请补全必填项");
|
|
39
|
+
},
|
|
40
|
+
style: {
|
|
41
|
+
width: `calc(100% - ${gutter * 2}px)`,
|
|
42
|
+
margin: `0 auto`
|
|
43
|
+
},
|
|
44
|
+
...restProps,
|
|
45
|
+
children: [/*#__PURE__*/jsx(Row, {
|
|
46
|
+
gutter: gutter,
|
|
47
|
+
children: /*#__PURE__*/jsx(FormItemsRenderer, {
|
|
48
|
+
options: options,
|
|
49
|
+
labelCol: labelCol,
|
|
50
|
+
span: span,
|
|
51
|
+
gutter: gutter,
|
|
52
|
+
useAutoGenerateRequired: useAutoGenerateRequired,
|
|
53
|
+
initialValues: values
|
|
54
|
+
})
|
|
55
|
+
}), showActionButtons && /*#__PURE__*/jsxs("div", {
|
|
56
|
+
style: {
|
|
57
|
+
transform: 'scale(1)',
|
|
58
|
+
margin: '0px -44px'
|
|
59
|
+
},
|
|
60
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
61
|
+
style: {
|
|
62
|
+
height: "52px"
|
|
63
|
+
}
|
|
64
|
+
}), /*#__PURE__*/jsx(Row, {
|
|
65
|
+
gutter: gutter,
|
|
66
|
+
style: {
|
|
67
|
+
textAlign: "center",
|
|
68
|
+
backgroundColor: "rgb(241, 241, 242)",
|
|
69
|
+
padding: "10px 0",
|
|
70
|
+
position: "fixed",
|
|
71
|
+
bottom: "0",
|
|
72
|
+
width: "100%"
|
|
73
|
+
},
|
|
74
|
+
children: /*#__PURE__*/jsx(Col, {
|
|
75
|
+
span: 24,
|
|
76
|
+
style: {
|
|
77
|
+
textAlign: "center"
|
|
78
|
+
},
|
|
79
|
+
children: customActionButtons || /*#__PURE__*/jsxs(Space, {
|
|
80
|
+
children: [showSubmitButton && /*#__PURE__*/jsx(Button, {
|
|
81
|
+
type: "primary",
|
|
82
|
+
htmlType: "submit",
|
|
83
|
+
children: submitButtonText
|
|
84
|
+
}), extraActionButtons, showCancelButton && /*#__PURE__*/jsx(Button, {
|
|
85
|
+
onClick: handleCancel,
|
|
86
|
+
children: cancelButtonText
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
})]
|
|
91
|
+
})]
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
FormBuilder.displayName = "FormBuilder";
|
|
96
|
+
|
|
97
|
+
export { FormBuilder as default };
|