szld-libs 0.3.91 → 0.3.93
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/dist/szld-components.es.js +729 -690
- package/dist/szld-components.umd.js +13 -13
- package/es/components/DynamicForm/index.js +52 -13
- package/es/index.css +1 -0
- package/lib/components/DynamicForm/index.js +52 -13
- package/lib/index.css +1 -0
- package/package.json +1 -1
|
@@ -58,9 +58,9 @@ const DynamicForm = forwardRef((props, ref) => {
|
|
|
58
58
|
return delFileListRef.current;
|
|
59
59
|
}
|
|
60
60
|
}));
|
|
61
|
-
return /* @__PURE__ */ jsx(Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsx(Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */ jsxs(
|
|
63
|
-
/* @__PURE__ */ jsx(Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
61
|
+
return /* @__PURE__ */ jsx(Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsx(Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsxs(Flex, { className: "custom-form-body", style: { position: "relative" }, children: [
|
|
62
|
+
/* @__PURE__ */ jsxs("div", { className: "custom-form-list", style: { flex: 1, overflowX: "auto" }, children: [
|
|
63
|
+
/* @__PURE__ */ jsx(Flex, { align: "center", style: { position: "relative", backgroundColor: "#004d32" }, children: /* @__PURE__ */ jsx(Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
64
64
|
var _a, _b;
|
|
65
65
|
const width = ((_a = child == null ? void 0 : child.json) == null ? void 0 : _a["input-width"]) && Number((_b = child == null ? void 0 : child.json) == null ? void 0 : _b["input-width"]) || defaultWidth;
|
|
66
66
|
return /* @__PURE__ */ jsxs(
|
|
@@ -78,11 +78,8 @@ const DynamicForm = forwardRef((props, ref) => {
|
|
|
78
78
|
},
|
|
79
79
|
index
|
|
80
80
|
);
|
|
81
|
-
}) }),
|
|
82
|
-
/* @__PURE__ */ jsx("
|
|
83
|
-
] }),
|
|
84
|
-
fields.map((field) => /* @__PURE__ */ jsxs(Flex, { align: "center", className: "custom-form-list-item-container", children: [
|
|
85
|
-
/* @__PURE__ */ jsx(Flex, { className: "custom-form-list-item", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
81
|
+
}) }) }),
|
|
82
|
+
fields.map((field) => /* @__PURE__ */ jsx(Flex, { align: "center", className: "custom-form-list-item-container", children: /* @__PURE__ */ jsx(Flex, { className: "custom-form-list-item", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
86
83
|
var _a, _b;
|
|
87
84
|
const width = ((_a = child == null ? void 0 : child.json) == null ? void 0 : _a["input-width"]) && Number((_b = child == null ? void 0 : child.json) == null ? void 0 : _b["input-width"]) || defaultWidth;
|
|
88
85
|
return /* @__PURE__ */ jsx(
|
|
@@ -102,7 +99,7 @@ const DynamicForm = forwardRef((props, ref) => {
|
|
|
102
99
|
instructionShowMode,
|
|
103
100
|
relatedid,
|
|
104
101
|
form,
|
|
105
|
-
defaultWidth:
|
|
102
|
+
defaultWidth: defaultWidth - 30,
|
|
106
103
|
formItemStyle,
|
|
107
104
|
isFormListItem: true,
|
|
108
105
|
formListField: field,
|
|
@@ -111,10 +108,52 @@ const DynamicForm = forwardRef((props, ref) => {
|
|
|
111
108
|
},
|
|
112
109
|
child.attrid || `child-${index}`
|
|
113
110
|
);
|
|
114
|
-
}) }),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
}) }) }, field.key))
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ jsxs(
|
|
114
|
+
Flex,
|
|
115
|
+
{
|
|
116
|
+
className: "custom-form-list-right",
|
|
117
|
+
vertical: true,
|
|
118
|
+
style: {
|
|
119
|
+
position: "sticky",
|
|
120
|
+
right: 0,
|
|
121
|
+
flexShrink: 0,
|
|
122
|
+
backgroundColor: "#fff",
|
|
123
|
+
zIndex: 1
|
|
124
|
+
},
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
"a",
|
|
128
|
+
{
|
|
129
|
+
className: "custom-form-list-add-btn",
|
|
130
|
+
onClick: () => add(),
|
|
131
|
+
style: {
|
|
132
|
+
display: "block",
|
|
133
|
+
textAlign: "center",
|
|
134
|
+
minWidth: "60px"
|
|
135
|
+
},
|
|
136
|
+
children: langId === "10001" ? "新增" : "Add"
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
fields.map((field) => /* @__PURE__ */ jsx(
|
|
140
|
+
"a",
|
|
141
|
+
{
|
|
142
|
+
className: "custom-form-list-del-btn",
|
|
143
|
+
onClick: () => remove(field.key),
|
|
144
|
+
style: {
|
|
145
|
+
display: "block",
|
|
146
|
+
textAlign: "center",
|
|
147
|
+
minWidth: "60px"
|
|
148
|
+
},
|
|
149
|
+
children: langId === "10001" ? "删除" : "Delete"
|
|
150
|
+
},
|
|
151
|
+
field.key
|
|
152
|
+
))
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
] }) }) : /* @__PURE__ */ jsx(Row, { gutter: colSpace, children: formConfig.map((item, index) => /* @__PURE__ */ jsx(Fragment$1, { children: handleRenderItem({
|
|
118
157
|
item,
|
|
119
158
|
readonly,
|
|
120
159
|
colNum,
|
package/es/index.css
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
margin-left: 14px;
|
|
49
49
|
}
|
|
50
50
|
.custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(even) .custom-form-list-item {
|
|
51
|
+
width: 100%;
|
|
51
52
|
background: #d6e2de !important;
|
|
52
53
|
}
|
|
53
54
|
.custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(even) .custom-form-list-item .custom-form-list-item-content {
|
|
@@ -59,9 +59,9 @@ const DynamicForm = react.forwardRef((props, ref) => {
|
|
|
59
59
|
return delFileListRef.current;
|
|
60
60
|
}
|
|
61
61
|
}));
|
|
62
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsxRuntime.jsx(antd.Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntime.
|
|
63
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
64
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
62
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsxRuntime.jsx(antd.Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { className: "custom-form-body", style: { position: "relative" }, children: [
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "custom-form-list", style: { flex: 1, overflowX: "auto" }, children: [
|
|
64
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { align: "center", style: { position: "relative", backgroundColor: "#004d32" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
65
65
|
var _a, _b;
|
|
66
66
|
const width = ((_a = child == null ? void 0 : child.json) == null ? void 0 : _a["input-width"]) && Number((_b = child == null ? void 0 : child.json) == null ? void 0 : _b["input-width"]) || defaultWidth;
|
|
67
67
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -79,11 +79,8 @@ const DynamicForm = react.forwardRef((props, ref) => {
|
|
|
79
79
|
},
|
|
80
80
|
index
|
|
81
81
|
);
|
|
82
|
-
}) }),
|
|
83
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
84
|
-
] }),
|
|
85
|
-
fields.map((field) => /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { align: "center", className: "custom-form-list-item-container", children: [
|
|
86
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-item", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
82
|
+
}) }) }),
|
|
83
|
+
fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { align: "center", className: "custom-form-list-item-container", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-item", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
87
84
|
var _a, _b;
|
|
88
85
|
const width = ((_a = child == null ? void 0 : child.json) == null ? void 0 : _a["input-width"]) && Number((_b = child == null ? void 0 : child.json) == null ? void 0 : _b["input-width"]) || defaultWidth;
|
|
89
86
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -103,7 +100,7 @@ const DynamicForm = react.forwardRef((props, ref) => {
|
|
|
103
100
|
instructionShowMode,
|
|
104
101
|
relatedid,
|
|
105
102
|
form,
|
|
106
|
-
defaultWidth:
|
|
103
|
+
defaultWidth: defaultWidth - 30,
|
|
107
104
|
formItemStyle,
|
|
108
105
|
isFormListItem: true,
|
|
109
106
|
formListField: field,
|
|
@@ -112,10 +109,52 @@ const DynamicForm = react.forwardRef((props, ref) => {
|
|
|
112
109
|
},
|
|
113
110
|
child.attrid || `child-${index}`
|
|
114
111
|
);
|
|
115
|
-
}) }),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
}) }) }, field.key))
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
115
|
+
antd.Flex,
|
|
116
|
+
{
|
|
117
|
+
className: "custom-form-list-right",
|
|
118
|
+
vertical: true,
|
|
119
|
+
style: {
|
|
120
|
+
position: "sticky",
|
|
121
|
+
right: 0,
|
|
122
|
+
flexShrink: 0,
|
|
123
|
+
backgroundColor: "#fff",
|
|
124
|
+
zIndex: 1
|
|
125
|
+
},
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
128
|
+
"a",
|
|
129
|
+
{
|
|
130
|
+
className: "custom-form-list-add-btn",
|
|
131
|
+
onClick: () => add(),
|
|
132
|
+
style: {
|
|
133
|
+
display: "block",
|
|
134
|
+
textAlign: "center",
|
|
135
|
+
minWidth: "60px"
|
|
136
|
+
},
|
|
137
|
+
children: langId === "10001" ? "新增" : "Add"
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
141
|
+
"a",
|
|
142
|
+
{
|
|
143
|
+
className: "custom-form-list-del-btn",
|
|
144
|
+
onClick: () => remove(field.key),
|
|
145
|
+
style: {
|
|
146
|
+
display: "block",
|
|
147
|
+
textAlign: "center",
|
|
148
|
+
minWidth: "60px"
|
|
149
|
+
},
|
|
150
|
+
children: langId === "10001" ? "删除" : "Delete"
|
|
151
|
+
},
|
|
152
|
+
field.key
|
|
153
|
+
))
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] }) }) : /* @__PURE__ */ jsxRuntime.jsx(antd.Row, { gutter: colSpace, children: formConfig.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: handleRenderItem({
|
|
119
158
|
item,
|
|
120
159
|
readonly,
|
|
121
160
|
colNum,
|
package/lib/index.css
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
margin-left: 14px;
|
|
49
49
|
}
|
|
50
50
|
.custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(even) .custom-form-list-item {
|
|
51
|
+
width: 100%;
|
|
51
52
|
background: #d6e2de !important;
|
|
52
53
|
}
|
|
53
54
|
.custom-form-body .custom-form-list .custom-form-list-item-container:nth-child(even) .custom-form-list-item .custom-form-list-item-content {
|