szld-libs 0.4.53 → 0.4.54
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 +3786 -3786
- package/dist/szld-components.umd.js +86 -86
- package/es/components/DynamicForm/useDynamicForm.js +13 -13
- package/es/index.js +3 -3
- package/es/mock/index.d.ts +3 -0
- package/es/mock/index.js +628 -8
- package/lib/components/DynamicForm/useDynamicForm.js +13 -13
- package/lib/index.js +3 -3
- package/lib/mock/index.d.ts +3 -0
- package/lib/mock/index.js +627 -7
- package/package.json +1 -1
|
@@ -302,7 +302,7 @@ function useDynamicForm(props) {
|
|
|
302
302
|
formListField,
|
|
303
303
|
isShowLabel = true
|
|
304
304
|
}) => {
|
|
305
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
305
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
306
306
|
const hidden = (_a = itemWithJson.json) == null ? void 0 : _a.hidden;
|
|
307
307
|
if (((_b = itemWithJson.json) == null ? void 0 : _b.hide) === true) {
|
|
308
308
|
return /* @__PURE__ */ jsx(Fragment$1, {});
|
|
@@ -336,17 +336,17 @@ function useDynamicForm(props) {
|
|
|
336
336
|
{
|
|
337
337
|
label: (_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["combination-name"],
|
|
338
338
|
required: ((_e = itemWithJson.json) == null ? void 0 : _e.must) && !hidden,
|
|
339
|
-
extra: /* @__PURE__ */ jsx(
|
|
339
|
+
extra: ((_g = (_f = itemWithJson.json) == null ? void 0 : _f.extraDescObj) == null ? void 0 : _g.info) ? /* @__PURE__ */ jsx(
|
|
340
340
|
"span",
|
|
341
341
|
{
|
|
342
342
|
style: {
|
|
343
|
-
marginTop: ((
|
|
343
|
+
marginTop: ((_i = (_h = itemWithJson.json) == null ? void 0 : _h.extraDescObj) == null ? void 0 : _i.info) ? 10 : 0,
|
|
344
344
|
display: "inline-block",
|
|
345
|
-
color: (
|
|
345
|
+
color: (_k = (_j = itemWithJson.json) == null ? void 0 : _j.extraDescObj) == null ? void 0 : _k.color
|
|
346
346
|
},
|
|
347
|
-
children: (
|
|
347
|
+
children: (_m = (_l = itemWithJson.json) == null ? void 0 : _l.extraDescObj) == null ? void 0 : _m.info
|
|
348
348
|
}
|
|
349
|
-
),
|
|
349
|
+
) : null,
|
|
350
350
|
children: /* @__PURE__ */ jsx(Space.Compact, { children: combinations.map((item, index) => {
|
|
351
351
|
var _a2, _b2, _c2, _d2, _e2;
|
|
352
352
|
let initValue = handleSetFormItemInitialValue(item);
|
|
@@ -412,28 +412,28 @@ function useDynamicForm(props) {
|
|
|
412
412
|
label: isShowLabel && handleDealInstruction(itemWithJson, instructionShowMode) || null,
|
|
413
413
|
initialValue,
|
|
414
414
|
hidden,
|
|
415
|
-
extra: ((
|
|
415
|
+
extra: ((_o = (_n = itemWithJson.json) == null ? void 0 : _n.extraDescObj) == null ? void 0 : _o.info) ? /* @__PURE__ */ jsx(
|
|
416
416
|
"span",
|
|
417
417
|
{
|
|
418
418
|
style: {
|
|
419
|
-
marginTop: ((
|
|
419
|
+
marginTop: ((_q = (_p = itemWithJson.json) == null ? void 0 : _p.extraDescObj) == null ? void 0 : _q.info) ? 10 : 0,
|
|
420
420
|
display: "inline-block",
|
|
421
|
-
color: (
|
|
421
|
+
color: (_s = (_r = itemWithJson.json) == null ? void 0 : _r.extraDescObj) == null ? void 0 : _s.color
|
|
422
422
|
},
|
|
423
|
-
children: (
|
|
423
|
+
children: (_u = (_t = itemWithJson.json) == null ? void 0 : _t.extraDescObj) == null ? void 0 : _u.info
|
|
424
424
|
}
|
|
425
425
|
) : null,
|
|
426
426
|
rules: [
|
|
427
|
-
...((
|
|
427
|
+
...((_v = itemWithJson.json) == null ? void 0 : _v.must) && !hidden ? [
|
|
428
428
|
{
|
|
429
429
|
required: true,
|
|
430
430
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
431
431
|
}
|
|
432
432
|
] : [],
|
|
433
|
-
...((
|
|
433
|
+
...((_w = itemWithJson.json) == null ? void 0 : _w.regexp) ? [
|
|
434
434
|
{
|
|
435
435
|
pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
|
|
436
|
-
message: ((
|
|
436
|
+
message: ((_x = itemWithJson.json) == null ? void 0 : _x["regexp-message"]) || `${itemWithJson.attrname}${langId === "10001" ? "格式不正确" : "Format is incorrect"}`
|
|
437
437
|
}
|
|
438
438
|
] : []
|
|
439
439
|
],
|
package/es/index.js
CHANGED
|
@@ -16,17 +16,17 @@ const Demo = () => {
|
|
|
16
16
|
const [form] = Form.useForm();
|
|
17
17
|
const [list, setList] = useState([]);
|
|
18
18
|
const [langId, setLangId] = useState("10002");
|
|
19
|
-
const onValuesChange = async (
|
|
19
|
+
const onValuesChange = async (values2, allValues) => {
|
|
20
20
|
};
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
setList(handleAttrList(attrList));
|
|
23
23
|
}, []);
|
|
24
|
-
const onFinish = async (
|
|
24
|
+
const onFinish = async (values2) => {
|
|
25
25
|
handleSubmitForm(
|
|
26
26
|
{
|
|
27
27
|
attr_list: list
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
values2
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
|