szld-libs 0.4.41 → 0.4.43
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 +6432 -6388
- package/dist/szld-components.umd.js +41 -41
- package/es/components/DynamicForm/index.d.ts +1 -0
- package/es/components/DynamicForm/useDynamicForm.js +26 -4
- package/es/components/DynamicFormMobile/useDynamicForm.js +24 -2
- package/es/mock/index.js +323 -408
- package/lib/components/DynamicForm/index.d.ts +1 -0
- package/lib/components/DynamicForm/useDynamicForm.js +26 -4
- package/lib/components/DynamicFormMobile/useDynamicForm.js +24 -2
- package/lib/mock/index.js +323 -408
- package/package.json +1 -1
|
@@ -301,7 +301,7 @@ function useDynamicForm(props) {
|
|
|
301
301
|
formListField,
|
|
302
302
|
isShowLabel = true
|
|
303
303
|
}) => {
|
|
304
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
304
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
305
305
|
const hidden = (_a = itemWithJson.json) == null ? void 0 : _a.hidden;
|
|
306
306
|
if (((_b = itemWithJson.json) == null ? void 0 : _b.hide) === true) {
|
|
307
307
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
@@ -335,6 +335,17 @@ function useDynamicForm(props) {
|
|
|
335
335
|
{
|
|
336
336
|
label: (_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["combination-name"],
|
|
337
337
|
required: ((_e = itemWithJson.json) == null ? void 0 : _e.must) && !hidden,
|
|
338
|
+
extra: /* @__PURE__ */ jsxRuntime.jsx(
|
|
339
|
+
"span",
|
|
340
|
+
{
|
|
341
|
+
style: {
|
|
342
|
+
marginTop: ((_g = (_f = itemWithJson.json) == null ? void 0 : _f.extraDescObj) == null ? void 0 : _g.info) ? 10 : 0,
|
|
343
|
+
display: "inline-block",
|
|
344
|
+
color: (_i = (_h = itemWithJson.json) == null ? void 0 : _h.extraDescObj) == null ? void 0 : _i.color
|
|
345
|
+
},
|
|
346
|
+
children: (_k = (_j = itemWithJson.json) == null ? void 0 : _j.extraDescObj) == null ? void 0 : _k.info
|
|
347
|
+
}
|
|
348
|
+
),
|
|
338
349
|
children: /* @__PURE__ */ jsxRuntime.jsx(antd.Space.Compact, { children: combinations.map((item, index) => {
|
|
339
350
|
var _a2, _b2, _c2, _d2, _e2;
|
|
340
351
|
let initValue = func.handleSetFormItemInitialValue(item);
|
|
@@ -400,17 +411,28 @@ function useDynamicForm(props) {
|
|
|
400
411
|
label: isShowLabel && handleDealInstruction(itemWithJson, instructionShowMode) || null,
|
|
401
412
|
initialValue,
|
|
402
413
|
hidden,
|
|
414
|
+
extra: /* @__PURE__ */ jsxRuntime.jsx(
|
|
415
|
+
"span",
|
|
416
|
+
{
|
|
417
|
+
style: {
|
|
418
|
+
marginTop: ((_m = (_l = itemWithJson.json) == null ? void 0 : _l.extraDescObj) == null ? void 0 : _m.info) ? 10 : 0,
|
|
419
|
+
display: "inline-block",
|
|
420
|
+
color: (_o = (_n = itemWithJson.json) == null ? void 0 : _n.extraDescObj) == null ? void 0 : _o.color
|
|
421
|
+
},
|
|
422
|
+
children: (_q = (_p = itemWithJson.json) == null ? void 0 : _p.extraDescObj) == null ? void 0 : _q.info
|
|
423
|
+
}
|
|
424
|
+
),
|
|
403
425
|
rules: [
|
|
404
|
-
...((
|
|
426
|
+
...((_r = itemWithJson.json) == null ? void 0 : _r.must) && !hidden ? [
|
|
405
427
|
{
|
|
406
428
|
required: true,
|
|
407
429
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
408
430
|
}
|
|
409
431
|
] : [],
|
|
410
|
-
...((
|
|
432
|
+
...((_s = itemWithJson.json) == null ? void 0 : _s.regexp) ? [
|
|
411
433
|
{
|
|
412
434
|
pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
|
|
413
|
-
message: ((
|
|
435
|
+
message: ((_t = itemWithJson.json) == null ? void 0 : _t["regexp-message"]) || `${itemWithJson.attrname}${langId === "10001" ? "格式不正确" : "Format is incorrect"}`
|
|
414
436
|
}
|
|
415
437
|
] : []
|
|
416
438
|
],
|
|
@@ -254,7 +254,7 @@ function useDynamicForm(props) {
|
|
|
254
254
|
formListField,
|
|
255
255
|
isShowLabel = true
|
|
256
256
|
}) => {
|
|
257
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
257
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
258
258
|
const hidden = (_a = itemWithJson.json) == null ? void 0 : _a.hidden;
|
|
259
259
|
if (((_b = itemWithJson.json) == null ? void 0 : _b.hide) === true || (hideAttrList == null ? void 0 : hideAttrList.includes(itemWithJson.attrid))) {
|
|
260
260
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
@@ -285,7 +285,7 @@ function useDynamicForm(props) {
|
|
|
285
285
|
const { combinations = [] } = itemWithJson.json || {};
|
|
286
286
|
if (combinations == null ? void 0 : combinations.length) {
|
|
287
287
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { children: combinations.map((item, index) => {
|
|
288
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
288
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
289
289
|
let initValue = func.handleSetFormItemInitialValue(item);
|
|
290
290
|
let width = defaultWidth;
|
|
291
291
|
const mode = item.json.input || "text";
|
|
@@ -324,6 +324,17 @@ function useDynamicForm(props) {
|
|
|
324
324
|
}
|
|
325
325
|
] : []
|
|
326
326
|
],
|
|
327
|
+
intro: /* @__PURE__ */ jsxRuntime.jsx(
|
|
328
|
+
"span",
|
|
329
|
+
{
|
|
330
|
+
style: {
|
|
331
|
+
marginTop: ((_i2 = (_h2 = itemWithJson.json) == null ? void 0 : _h2.extraDescObj) == null ? void 0 : _i2.info) ? 10 : 0,
|
|
332
|
+
display: "inline-block",
|
|
333
|
+
color: (_k2 = (_j2 = itemWithJson.json) == null ? void 0 : _j2.extraDescObj) == null ? void 0 : _k2.color
|
|
334
|
+
},
|
|
335
|
+
children: (_m2 = (_l2 = itemWithJson.json) == null ? void 0 : _l2.extraDescObj) == null ? void 0 : _m2.info
|
|
336
|
+
}
|
|
337
|
+
),
|
|
327
338
|
...handleSetFormItemProps(item),
|
|
328
339
|
children: handleRenderItemInputMode({
|
|
329
340
|
item,
|
|
@@ -369,6 +380,17 @@ function useDynamicForm(props) {
|
|
|
369
380
|
] : []
|
|
370
381
|
],
|
|
371
382
|
...handleSetFormItemProps(itemWithJson),
|
|
383
|
+
intro: /* @__PURE__ */ jsxRuntime.jsx(
|
|
384
|
+
"span",
|
|
385
|
+
{
|
|
386
|
+
style: {
|
|
387
|
+
marginTop: ((_i = (_h = itemWithJson.json) == null ? void 0 : _h.extraDescObj) == null ? void 0 : _i.info) ? 10 : 0,
|
|
388
|
+
display: "inline-block",
|
|
389
|
+
color: (_k = (_j = itemWithJson.json) == null ? void 0 : _j.extraDescObj) == null ? void 0 : _k.color
|
|
390
|
+
},
|
|
391
|
+
children: (_m = (_l = itemWithJson.json) == null ? void 0 : _l.extraDescObj) == null ? void 0 : _m.info
|
|
392
|
+
}
|
|
393
|
+
),
|
|
372
394
|
children: handleRenderItemInputMode({
|
|
373
395
|
item: itemWithJson,
|
|
374
396
|
readonly,
|