szld-libs 0.2.73 → 0.2.75
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 +3315 -3313
- package/dist/szld-components.umd.js +38 -38
- package/es/components/DynamicForm/index.d.ts +1 -0
- package/es/components/DynamicForm/mySelect/index.js +1 -1
- package/es/components/DynamicForm/selectModel/index.js +1 -1
- package/es/components/DynamicForm/useDynamicForm.js +17 -15
- package/lib/components/DynamicForm/index.d.ts +1 -0
- package/lib/components/DynamicForm/mySelect/index.js +1 -1
- package/lib/components/DynamicForm/selectModel/index.js +1 -1
- package/lib/components/DynamicForm/useDynamicForm.js +17 -15
- package/package.json +1 -1
|
@@ -113,7 +113,7 @@ const MySelect = ({
|
|
|
113
113
|
return /* @__PURE__ */ jsx(
|
|
114
114
|
Select,
|
|
115
115
|
{
|
|
116
|
-
placeholder: "请选择",
|
|
116
|
+
placeholder: (item == null ? void 0 : item["message"]) || "请选择",
|
|
117
117
|
mode: item.input === "mult-select" ? "multiple" : void 0,
|
|
118
118
|
disabled: readonly,
|
|
119
119
|
loading,
|
|
@@ -241,7 +241,7 @@ function useDynamicForm(props) {
|
|
|
241
241
|
formListField,
|
|
242
242
|
isShowLabel = true
|
|
243
243
|
}) => {
|
|
244
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
244
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
245
245
|
const isFormList = (_a = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _a["properties-multiple"];
|
|
246
246
|
let formListInitValue = [];
|
|
247
247
|
if (isFormList) {
|
|
@@ -354,6 +354,7 @@ function useDynamicForm(props) {
|
|
|
354
354
|
}
|
|
355
355
|
if (itemWithJson.attrtype === 0) {
|
|
356
356
|
let initialValue = handleSetFormItemInitialValue(itemWithJson);
|
|
357
|
+
const message2 = (_c = itemWithJson.json) == null ? void 0 : _c["default-prompt"];
|
|
357
358
|
let placeholder = "请输入";
|
|
358
359
|
const { input = "" } = itemWithJson.json || {};
|
|
359
360
|
if ([
|
|
@@ -379,7 +380,7 @@ function useDynamicForm(props) {
|
|
|
379
380
|
}
|
|
380
381
|
const { combinations = [] } = itemWithJson.json || {};
|
|
381
382
|
if (combinations == null ? void 0 : combinations.length) {
|
|
382
|
-
return /* @__PURE__ */ jsx(Col, { span: 24 / colNum, children: /* @__PURE__ */ jsx(Form.Item, { label: (
|
|
383
|
+
return /* @__PURE__ */ jsx(Col, { span: 24 / colNum, children: /* @__PURE__ */ jsx(Form.Item, { label: (_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["combination-name"], children: /* @__PURE__ */ jsx(Space.Compact, { children: combinations.map((item, index) => {
|
|
383
384
|
var _a2, _b2, _c2, _d2;
|
|
384
385
|
let initValue = handleSetFormItemInitialValue(item);
|
|
385
386
|
let width = defaultWidth;
|
|
@@ -406,7 +407,7 @@ function useDynamicForm(props) {
|
|
|
406
407
|
...((_b2 = item.json) == null ? void 0 : _b2.must) ? [
|
|
407
408
|
{
|
|
408
409
|
required: true,
|
|
409
|
-
message: `${placeholder}${item.attrname}`
|
|
410
|
+
message: message2 || `${placeholder}${item.attrname}`
|
|
410
411
|
}
|
|
411
412
|
] : [],
|
|
412
413
|
...((_c2 = itemWithJson.json) == null ? void 0 : _c2.regexp) ? [
|
|
@@ -440,16 +441,16 @@ function useDynamicForm(props) {
|
|
|
440
441
|
label: isShowLabel && handleDealInstruction(itemWithJson, instructionShowMode) || null,
|
|
441
442
|
initialValue,
|
|
442
443
|
rules: [
|
|
443
|
-
...((
|
|
444
|
+
...((_e = itemWithJson.json) == null ? void 0 : _e.must) ? [
|
|
444
445
|
{
|
|
445
446
|
required: true,
|
|
446
447
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
447
448
|
}
|
|
448
449
|
] : [],
|
|
449
|
-
...((
|
|
450
|
+
...((_f = itemWithJson.json) == null ? void 0 : _f.regexp) ? [
|
|
450
451
|
{
|
|
451
452
|
pattern: new RegExp(itemWithJson.json.regexp),
|
|
452
|
-
message: ((
|
|
453
|
+
message: ((_g = itemWithJson.json) == null ? void 0 : _g["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
453
454
|
}
|
|
454
455
|
] : []
|
|
455
456
|
],
|
|
@@ -474,16 +475,16 @@ function useDynamicForm(props) {
|
|
|
474
475
|
label: isShowLabel && handleDealInstruction(itemWithJson, instructionShowMode) || null,
|
|
475
476
|
initialValue,
|
|
476
477
|
rules: [
|
|
477
|
-
...((
|
|
478
|
+
...((_h = itemWithJson.json) == null ? void 0 : _h.must) ? [
|
|
478
479
|
{
|
|
479
480
|
required: true,
|
|
480
481
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
481
482
|
}
|
|
482
483
|
] : [],
|
|
483
|
-
...((
|
|
484
|
+
...((_i = itemWithJson.json) == null ? void 0 : _i.regexp) ? [
|
|
484
485
|
{
|
|
485
486
|
pattern: new RegExp(itemWithJson.json.regexp),
|
|
486
|
-
message: ((
|
|
487
|
+
message: ((_j = itemWithJson.json) == null ? void 0 : _j["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
487
488
|
}
|
|
488
489
|
] : []
|
|
489
490
|
],
|
|
@@ -539,9 +540,10 @@ function useDynamicForm(props) {
|
|
|
539
540
|
defaultWidth = 358,
|
|
540
541
|
customWidth = {}
|
|
541
542
|
}) => {
|
|
542
|
-
var _a, _b;
|
|
543
|
+
var _a, _b, _c;
|
|
543
544
|
const mode = item.json.input || "text";
|
|
544
545
|
const formatValue = handleSetFormItemInitialValue(item);
|
|
546
|
+
const message2 = ((_a = item.json) == null ? void 0 : _a["default-prompt"]) || "";
|
|
545
547
|
const params = item.json.length && {
|
|
546
548
|
maxLength: item.json.length
|
|
547
549
|
} || {};
|
|
@@ -552,7 +554,7 @@ function useDynamicForm(props) {
|
|
|
552
554
|
Input,
|
|
553
555
|
{
|
|
554
556
|
disabled: true,
|
|
555
|
-
value: ((
|
|
557
|
+
value: ((_b = item.json) == null ? void 0 : _b["label-value"]) || item.attrvalue || ((_c = item.json) == null ? void 0 : _c.default) || "-",
|
|
556
558
|
style: { width: defaultWidth, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
557
559
|
}
|
|
558
560
|
);
|
|
@@ -560,7 +562,7 @@ function useDynamicForm(props) {
|
|
|
560
562
|
return /* @__PURE__ */ jsx(
|
|
561
563
|
Input,
|
|
562
564
|
{
|
|
563
|
-
placeholder: "请输入",
|
|
565
|
+
placeholder: message2 || "请输入",
|
|
564
566
|
...params,
|
|
565
567
|
disabled: readonly,
|
|
566
568
|
allowClear: true,
|
|
@@ -571,7 +573,7 @@ function useDynamicForm(props) {
|
|
|
571
573
|
return /* @__PURE__ */ jsx(
|
|
572
574
|
Input.Password,
|
|
573
575
|
{
|
|
574
|
-
placeholder: "请输入",
|
|
576
|
+
placeholder: message2 || "请输入",
|
|
575
577
|
...params,
|
|
576
578
|
disabled: readonly,
|
|
577
579
|
allowClear: true,
|
|
@@ -583,7 +585,7 @@ function useDynamicForm(props) {
|
|
|
583
585
|
Input.TextArea,
|
|
584
586
|
{
|
|
585
587
|
allowClear: true,
|
|
586
|
-
placeholder: "请输入",
|
|
588
|
+
placeholder: message2 || "请输入",
|
|
587
589
|
rows: 5,
|
|
588
590
|
...params,
|
|
589
591
|
disabled: readonly,
|
|
@@ -595,7 +597,7 @@ function useDynamicForm(props) {
|
|
|
595
597
|
InputNumber,
|
|
596
598
|
{
|
|
597
599
|
controls: false,
|
|
598
|
-
placeholder: "请输入",
|
|
600
|
+
placeholder: message2 || "请输入",
|
|
599
601
|
...params,
|
|
600
602
|
disabled: readonly,
|
|
601
603
|
style: { width: defaultWidth, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
@@ -114,7 +114,7 @@ const MySelect = ({
|
|
|
114
114
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
115
115
|
antd.Select,
|
|
116
116
|
{
|
|
117
|
-
placeholder: "请选择",
|
|
117
|
+
placeholder: (item == null ? void 0 : item["message"]) || "请选择",
|
|
118
118
|
mode: item.input === "mult-select" ? "multiple" : void 0,
|
|
119
119
|
disabled: readonly,
|
|
120
120
|
loading,
|
|
@@ -242,7 +242,7 @@ function useDynamicForm(props) {
|
|
|
242
242
|
formListField,
|
|
243
243
|
isShowLabel = true
|
|
244
244
|
}) => {
|
|
245
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
245
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
246
246
|
const isFormList = (_a = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _a["properties-multiple"];
|
|
247
247
|
let formListInitValue = [];
|
|
248
248
|
if (isFormList) {
|
|
@@ -355,6 +355,7 @@ function useDynamicForm(props) {
|
|
|
355
355
|
}
|
|
356
356
|
if (itemWithJson.attrtype === 0) {
|
|
357
357
|
let initialValue = handleSetFormItemInitialValue(itemWithJson);
|
|
358
|
+
const message2 = (_c = itemWithJson.json) == null ? void 0 : _c["default-prompt"];
|
|
358
359
|
let placeholder = "请输入";
|
|
359
360
|
const { input = "" } = itemWithJson.json || {};
|
|
360
361
|
if ([
|
|
@@ -380,7 +381,7 @@ function useDynamicForm(props) {
|
|
|
380
381
|
}
|
|
381
382
|
const { combinations = [] } = itemWithJson.json || {};
|
|
382
383
|
if (combinations == null ? void 0 : combinations.length) {
|
|
383
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: 24 / colNum, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { label: (
|
|
384
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { span: 24 / colNum, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { label: (_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["combination-name"], children: /* @__PURE__ */ jsxRuntime.jsx(antd.Space.Compact, { children: combinations.map((item, index) => {
|
|
384
385
|
var _a2, _b2, _c2, _d2;
|
|
385
386
|
let initValue = handleSetFormItemInitialValue(item);
|
|
386
387
|
let width = defaultWidth;
|
|
@@ -407,7 +408,7 @@ function useDynamicForm(props) {
|
|
|
407
408
|
...((_b2 = item.json) == null ? void 0 : _b2.must) ? [
|
|
408
409
|
{
|
|
409
410
|
required: true,
|
|
410
|
-
message: `${placeholder}${item.attrname}`
|
|
411
|
+
message: message2 || `${placeholder}${item.attrname}`
|
|
411
412
|
}
|
|
412
413
|
] : [],
|
|
413
414
|
...((_c2 = itemWithJson.json) == null ? void 0 : _c2.regexp) ? [
|
|
@@ -441,16 +442,16 @@ function useDynamicForm(props) {
|
|
|
441
442
|
label: isShowLabel && handleDealInstruction(itemWithJson, instructionShowMode) || null,
|
|
442
443
|
initialValue,
|
|
443
444
|
rules: [
|
|
444
|
-
...((
|
|
445
|
+
...((_e = itemWithJson.json) == null ? void 0 : _e.must) ? [
|
|
445
446
|
{
|
|
446
447
|
required: true,
|
|
447
448
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
448
449
|
}
|
|
449
450
|
] : [],
|
|
450
|
-
...((
|
|
451
|
+
...((_f = itemWithJson.json) == null ? void 0 : _f.regexp) ? [
|
|
451
452
|
{
|
|
452
453
|
pattern: new RegExp(itemWithJson.json.regexp),
|
|
453
|
-
message: ((
|
|
454
|
+
message: ((_g = itemWithJson.json) == null ? void 0 : _g["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
454
455
|
}
|
|
455
456
|
] : []
|
|
456
457
|
],
|
|
@@ -475,16 +476,16 @@ function useDynamicForm(props) {
|
|
|
475
476
|
label: isShowLabel && handleDealInstruction(itemWithJson, instructionShowMode) || null,
|
|
476
477
|
initialValue,
|
|
477
478
|
rules: [
|
|
478
|
-
...((
|
|
479
|
+
...((_h = itemWithJson.json) == null ? void 0 : _h.must) ? [
|
|
479
480
|
{
|
|
480
481
|
required: true,
|
|
481
482
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
482
483
|
}
|
|
483
484
|
] : [],
|
|
484
|
-
...((
|
|
485
|
+
...((_i = itemWithJson.json) == null ? void 0 : _i.regexp) ? [
|
|
485
486
|
{
|
|
486
487
|
pattern: new RegExp(itemWithJson.json.regexp),
|
|
487
|
-
message: ((
|
|
488
|
+
message: ((_j = itemWithJson.json) == null ? void 0 : _j["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
|
|
488
489
|
}
|
|
489
490
|
] : []
|
|
490
491
|
],
|
|
@@ -540,9 +541,10 @@ function useDynamicForm(props) {
|
|
|
540
541
|
defaultWidth = 358,
|
|
541
542
|
customWidth = {}
|
|
542
543
|
}) => {
|
|
543
|
-
var _a, _b;
|
|
544
|
+
var _a, _b, _c;
|
|
544
545
|
const mode = item.json.input || "text";
|
|
545
546
|
const formatValue = handleSetFormItemInitialValue(item);
|
|
547
|
+
const message2 = ((_a = item.json) == null ? void 0 : _a["default-prompt"]) || "";
|
|
546
548
|
const params = item.json.length && {
|
|
547
549
|
maxLength: item.json.length
|
|
548
550
|
} || {};
|
|
@@ -553,7 +555,7 @@ function useDynamicForm(props) {
|
|
|
553
555
|
antd.Input,
|
|
554
556
|
{
|
|
555
557
|
disabled: true,
|
|
556
|
-
value: ((
|
|
558
|
+
value: ((_b = item.json) == null ? void 0 : _b["label-value"]) || item.attrvalue || ((_c = item.json) == null ? void 0 : _c.default) || "-",
|
|
557
559
|
style: { width: defaultWidth, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
558
560
|
}
|
|
559
561
|
);
|
|
@@ -561,7 +563,7 @@ function useDynamicForm(props) {
|
|
|
561
563
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
562
564
|
antd.Input,
|
|
563
565
|
{
|
|
564
|
-
placeholder: "请输入",
|
|
566
|
+
placeholder: message2 || "请输入",
|
|
565
567
|
...params,
|
|
566
568
|
disabled: readonly,
|
|
567
569
|
allowClear: true,
|
|
@@ -572,7 +574,7 @@ function useDynamicForm(props) {
|
|
|
572
574
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
573
575
|
antd.Input.Password,
|
|
574
576
|
{
|
|
575
|
-
placeholder: "请输入",
|
|
577
|
+
placeholder: message2 || "请输入",
|
|
576
578
|
...params,
|
|
577
579
|
disabled: readonly,
|
|
578
580
|
allowClear: true,
|
|
@@ -584,7 +586,7 @@ function useDynamicForm(props) {
|
|
|
584
586
|
antd.Input.TextArea,
|
|
585
587
|
{
|
|
586
588
|
allowClear: true,
|
|
587
|
-
placeholder: "请输入",
|
|
589
|
+
placeholder: message2 || "请输入",
|
|
588
590
|
rows: 5,
|
|
589
591
|
...params,
|
|
590
592
|
disabled: readonly,
|
|
@@ -596,7 +598,7 @@ function useDynamicForm(props) {
|
|
|
596
598
|
antd.InputNumber,
|
|
597
599
|
{
|
|
598
600
|
controls: false,
|
|
599
|
-
placeholder: "请输入",
|
|
601
|
+
placeholder: message2 || "请输入",
|
|
600
602
|
...params,
|
|
601
603
|
disabled: readonly,
|
|
602
604
|
style: { width: defaultWidth, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|