szld-libs 0.3.49 → 0.3.51
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 +571 -568
- package/dist/szld-components.umd.js +1 -1
- package/es/components/DynamicForm/myCheckbox/index.js +1 -1
- package/es/components/DynamicForm/myRadio/index.js +1 -1
- package/es/components/DynamicForm/mySelect/index.js +1 -1
- package/es/components/DynamicForm/useDynamicForm.js +290 -287
- package/es/index.js +18 -15
- package/lib/components/DynamicForm/myCheckbox/index.js +1 -1
- package/lib/components/DynamicForm/myRadio/index.js +1 -1
- package/lib/components/DynamicForm/mySelect/index.js +1 -1
- package/lib/components/DynamicForm/useDynamicForm.js +290 -287
- package/lib/index.js +16 -13
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ const MyCheckbox = (props) => {
|
|
|
23
23
|
const [val, setVal] = useState(value || []);
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
handleLoadOptions();
|
|
26
|
-
}, [item.inputType, item.classify, item.data, item.options]);
|
|
26
|
+
}, [item.inputType, item.classify, item.data, item.options, langConfig]);
|
|
27
27
|
const handleLoadOptions = async () => {
|
|
28
28
|
const list2 = await handleSelectOptions({
|
|
29
29
|
commonRequestWidthParams,
|
|
@@ -21,7 +21,7 @@ const MyRadio = (props) => {
|
|
|
21
21
|
const [list, setList] = useState([]);
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
handleLoadOptions();
|
|
24
|
-
}, [item.inputType, item.classify, item.data, item.options]);
|
|
24
|
+
}, [item.inputType, item.classify, item.data, item.options, langConfig]);
|
|
25
25
|
const handleLoadOptions = async () => {
|
|
26
26
|
const list2 = await handleSelectOptions({
|
|
27
27
|
commonRequestWidthParams,
|
|
@@ -21,7 +21,7 @@ const MySelect = ({
|
|
|
21
21
|
const [loading, setLoading] = useState(false);
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
handleLoadOptions();
|
|
24
|
-
}, [item.inputType, item.classify, item.data, item.options]);
|
|
24
|
+
}, [item.inputType, item.classify, item.data, item.options, langConfig]);
|
|
25
25
|
const handleLoadOptions = async () => {
|
|
26
26
|
setLoading(true);
|
|
27
27
|
const list = await handleSelectOptions({
|
|
@@ -397,7 +397,7 @@ function useDynamicForm(props) {
|
|
|
397
397
|
}
|
|
398
398
|
return null;
|
|
399
399
|
},
|
|
400
|
-
[handleDealInstruction, handleSetFormItemInitialValue, handleSetFormItemProps, renderNestedFormList]
|
|
400
|
+
[handleDealInstruction, handleSetFormItemInitialValue, handleSetFormItemProps, renderNestedFormList, langConfig]
|
|
401
401
|
);
|
|
402
402
|
const handleOnRemove = async (file) => {
|
|
403
403
|
var _a;
|
|
@@ -422,297 +422,300 @@ function useDynamicForm(props) {
|
|
|
422
422
|
return false;
|
|
423
423
|
}
|
|
424
424
|
};
|
|
425
|
-
const handleRenderItemInputMode = (
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
const width = inputWidth || defaultWidth;
|
|
452
|
-
switch (mode) {
|
|
453
|
-
case "label":
|
|
454
|
-
return /* @__PURE__ */ jsx(
|
|
455
|
-
Input,
|
|
456
|
-
{
|
|
457
|
-
disabled: true,
|
|
458
|
-
value: ((_e = item.json) == null ? void 0 : _e["label-value"]) || item.attrvalue || ((_f = item.json) == null ? void 0 : _f.default) || "-",
|
|
459
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
460
|
-
}
|
|
461
|
-
);
|
|
462
|
-
case "text":
|
|
463
|
-
return /* @__PURE__ */ jsx(
|
|
464
|
-
Input,
|
|
465
|
-
{
|
|
466
|
-
placeholder: message2 || placeholder,
|
|
467
|
-
...params,
|
|
468
|
-
disabled: readonly,
|
|
469
|
-
allowClear: true,
|
|
470
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
471
|
-
}
|
|
472
|
-
);
|
|
473
|
-
case "password":
|
|
474
|
-
return /* @__PURE__ */ jsx(
|
|
475
|
-
Input.Password,
|
|
476
|
-
{
|
|
477
|
-
placeholder: message2 || placeholder,
|
|
478
|
-
...params,
|
|
479
|
-
disabled: readonly,
|
|
480
|
-
allowClear: true,
|
|
481
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
482
|
-
}
|
|
483
|
-
);
|
|
484
|
-
case "textarea":
|
|
485
|
-
return /* @__PURE__ */ jsx(
|
|
486
|
-
Input.TextArea,
|
|
487
|
-
{
|
|
488
|
-
allowClear: true,
|
|
489
|
-
placeholder: message2 || placeholder,
|
|
490
|
-
rows: 5,
|
|
491
|
-
...params,
|
|
492
|
-
disabled: readonly,
|
|
493
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
494
|
-
}
|
|
495
|
-
);
|
|
496
|
-
case "number":
|
|
497
|
-
return /* @__PURE__ */ jsx(
|
|
498
|
-
InputNumber,
|
|
499
|
-
{
|
|
500
|
-
controls: false,
|
|
501
|
-
placeholder: message2 || placeholder,
|
|
502
|
-
...params,
|
|
503
|
-
disabled: readonly,
|
|
504
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
505
|
-
}
|
|
506
|
-
);
|
|
507
|
-
case "select":
|
|
508
|
-
case "mult-select": {
|
|
509
|
-
return /* @__PURE__ */ jsx(
|
|
510
|
-
MySelect,
|
|
511
|
-
{
|
|
512
|
-
item: item.json,
|
|
513
|
-
readonly,
|
|
514
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
|
|
515
|
-
commonRequestWidthParams,
|
|
516
|
-
commonRequest,
|
|
517
|
-
value: formatValue,
|
|
518
|
-
interfaceTypeDict,
|
|
519
|
-
interfaceTypeSysDict,
|
|
520
|
-
actionUrlKey,
|
|
521
|
-
actionUrlExtraParams,
|
|
522
|
-
langId,
|
|
523
|
-
langConfig,
|
|
524
|
-
onChange: (val) => {
|
|
525
|
-
form.setFieldValue(item.attrid, val);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
);
|
|
529
|
-
}
|
|
530
|
-
case "modal-mult-select":
|
|
531
|
-
case "modal-select": {
|
|
532
|
-
return /* @__PURE__ */ jsx(
|
|
533
|
-
SelectModel,
|
|
534
|
-
{
|
|
535
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
|
|
536
|
-
item: item.json,
|
|
537
|
-
value: item.attrvalue || item.json.default || "",
|
|
538
|
-
commonRequestWidthParams,
|
|
539
|
-
commonRequest,
|
|
540
|
-
onSure: async (value) => {
|
|
541
|
-
form.setFieldValue(item.attrid, value);
|
|
542
|
-
},
|
|
543
|
-
disabled: readonly,
|
|
544
|
-
langId,
|
|
545
|
-
CustomModalComponent
|
|
546
|
-
}
|
|
547
|
-
);
|
|
548
|
-
}
|
|
549
|
-
case "mul-field-modal-select": {
|
|
550
|
-
return /* @__PURE__ */ jsx(
|
|
551
|
-
SelectModelBackfillFormItem,
|
|
552
|
-
{
|
|
553
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
|
|
554
|
-
item: item.json,
|
|
555
|
-
form,
|
|
556
|
-
attrid,
|
|
557
|
-
value: item.attrvalue || item.json.default || "",
|
|
558
|
-
commonRequestWidthParams,
|
|
559
|
-
commonRequest,
|
|
560
|
-
onSure: async (value) => {
|
|
561
|
-
form.setFieldsValue(value);
|
|
562
|
-
},
|
|
563
|
-
disabled: readonly,
|
|
564
|
-
CustomModalComponent,
|
|
565
|
-
langId
|
|
566
|
-
}
|
|
567
|
-
);
|
|
425
|
+
const handleRenderItemInputMode = useCallback(
|
|
426
|
+
({
|
|
427
|
+
item,
|
|
428
|
+
readonly = false,
|
|
429
|
+
formItemStyle = [],
|
|
430
|
+
radioAlign = "horizontal",
|
|
431
|
+
relatedid,
|
|
432
|
+
form,
|
|
433
|
+
defaultWidth = 358,
|
|
434
|
+
customWidth = {}
|
|
435
|
+
}) => {
|
|
436
|
+
var _a, _b, _c, _d, _e, _f;
|
|
437
|
+
const mode = item.json.input || "text";
|
|
438
|
+
const format = ((_a = item.json) == null ? void 0 : _a.format) || "";
|
|
439
|
+
const attrid = item.attrid;
|
|
440
|
+
const formatValue = handleSetFormItemInitialValue(item);
|
|
441
|
+
const message2 = getTitle(langConfig, (_b = item.json) == null ? void 0 : _b["default-prompt"]) || "";
|
|
442
|
+
const disableDateGoover = ((_c = item.json) == null ? void 0 : _c["disable-date-goover"]) || false;
|
|
443
|
+
const placeholder = handleGetPlaceholder(item, langId);
|
|
444
|
+
const params = item.json.length && {
|
|
445
|
+
maxLength: item.json.length
|
|
446
|
+
} || {};
|
|
447
|
+
const itemStyle = formItemStyle.find((v) => v.type === mode);
|
|
448
|
+
let inputWidth = (_d = item.json) == null ? void 0 : _d["input-width"];
|
|
449
|
+
if (inputWidth) {
|
|
450
|
+
inputWidth = formShowType === "table" ? Number(inputWidth) - 32 : inputWidth;
|
|
568
451
|
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
452
|
+
const width = inputWidth || defaultWidth;
|
|
453
|
+
switch (mode) {
|
|
454
|
+
case "label":
|
|
455
|
+
return /* @__PURE__ */ jsx(
|
|
456
|
+
Input,
|
|
457
|
+
{
|
|
458
|
+
disabled: true,
|
|
459
|
+
value: ((_e = item.json) == null ? void 0 : _e["label-value"]) || item.attrvalue || ((_f = item.json) == null ? void 0 : _f.default) || "-",
|
|
460
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
461
|
+
}
|
|
462
|
+
);
|
|
463
|
+
case "text":
|
|
464
|
+
return /* @__PURE__ */ jsx(
|
|
465
|
+
Input,
|
|
466
|
+
{
|
|
467
|
+
placeholder: message2 || placeholder,
|
|
468
|
+
...params,
|
|
469
|
+
disabled: readonly,
|
|
470
|
+
allowClear: true,
|
|
471
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
472
|
+
}
|
|
473
|
+
);
|
|
474
|
+
case "password":
|
|
475
|
+
return /* @__PURE__ */ jsx(
|
|
476
|
+
Input.Password,
|
|
477
|
+
{
|
|
478
|
+
placeholder: message2 || placeholder,
|
|
479
|
+
...params,
|
|
480
|
+
disabled: readonly,
|
|
481
|
+
allowClear: true,
|
|
482
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
483
|
+
}
|
|
484
|
+
);
|
|
485
|
+
case "textarea":
|
|
486
|
+
return /* @__PURE__ */ jsx(
|
|
487
|
+
Input.TextArea,
|
|
488
|
+
{
|
|
489
|
+
allowClear: true,
|
|
490
|
+
placeholder: message2 || placeholder,
|
|
491
|
+
rows: 5,
|
|
492
|
+
...params,
|
|
493
|
+
disabled: readonly,
|
|
494
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
495
|
+
}
|
|
496
|
+
);
|
|
497
|
+
case "number":
|
|
498
|
+
return /* @__PURE__ */ jsx(
|
|
499
|
+
InputNumber,
|
|
500
|
+
{
|
|
501
|
+
controls: false,
|
|
502
|
+
placeholder: message2 || placeholder,
|
|
503
|
+
...params,
|
|
504
|
+
disabled: readonly,
|
|
505
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
506
|
+
}
|
|
507
|
+
);
|
|
508
|
+
case "select":
|
|
509
|
+
case "mult-select": {
|
|
510
|
+
return /* @__PURE__ */ jsx(
|
|
511
|
+
MySelect,
|
|
512
|
+
{
|
|
513
|
+
item: item.json,
|
|
514
|
+
readonly,
|
|
515
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
|
|
516
|
+
commonRequestWidthParams,
|
|
517
|
+
commonRequest,
|
|
518
|
+
value: formatValue,
|
|
519
|
+
interfaceTypeDict,
|
|
520
|
+
interfaceTypeSysDict,
|
|
521
|
+
actionUrlKey,
|
|
522
|
+
actionUrlExtraParams,
|
|
523
|
+
langId,
|
|
524
|
+
langConfig,
|
|
525
|
+
onChange: (val) => {
|
|
526
|
+
form.setFieldValue(item.attrid, val);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
);
|
|
588
530
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
{
|
|
606
|
-
disabledDate: disableDateGoover ? disabledDate : void 0,
|
|
607
|
-
disabled: readonly,
|
|
608
|
-
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
609
|
-
}
|
|
610
|
-
);
|
|
611
|
-
case "multiple-date-picker":
|
|
612
|
-
return /* @__PURE__ */ jsx(DatePicker, { multiple: true, disabled: readonly, style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth } });
|
|
613
|
-
case "radio":
|
|
614
|
-
return /* @__PURE__ */ jsx(
|
|
615
|
-
MyRadio,
|
|
616
|
-
{
|
|
617
|
-
radioAlign,
|
|
618
|
-
commonRequest,
|
|
619
|
-
commonRequestWidthParams,
|
|
620
|
-
item: item.json,
|
|
621
|
-
readonly,
|
|
622
|
-
options: params,
|
|
623
|
-
handleUrlOptions,
|
|
624
|
-
value: formatValue,
|
|
625
|
-
interfaceTypeDict,
|
|
626
|
-
interfaceTypeSysDict,
|
|
627
|
-
actionUrlKey,
|
|
628
|
-
actionUrlExtraParams,
|
|
629
|
-
langConfig,
|
|
630
|
-
onChange: (e) => {
|
|
631
|
-
form.setFieldValue(item.attrid, e.target.value);
|
|
531
|
+
case "modal-mult-select":
|
|
532
|
+
case "modal-select": {
|
|
533
|
+
return /* @__PURE__ */ jsx(
|
|
534
|
+
SelectModel,
|
|
535
|
+
{
|
|
536
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
|
|
537
|
+
item: item.json,
|
|
538
|
+
value: item.attrvalue || item.json.default || "",
|
|
539
|
+
commonRequestWidthParams,
|
|
540
|
+
commonRequest,
|
|
541
|
+
onSure: async (value) => {
|
|
542
|
+
form.setFieldValue(item.attrid, value);
|
|
543
|
+
},
|
|
544
|
+
disabled: readonly,
|
|
545
|
+
langId,
|
|
546
|
+
CustomModalComponent
|
|
632
547
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
form.setFieldValue(item.attrid, val.join(","));
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
case "mul-field-modal-select": {
|
|
551
|
+
return /* @__PURE__ */ jsx(
|
|
552
|
+
SelectModelBackfillFormItem,
|
|
553
|
+
{
|
|
554
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
|
|
555
|
+
item: item.json,
|
|
556
|
+
form,
|
|
557
|
+
attrid,
|
|
558
|
+
value: item.attrvalue || item.json.default || "",
|
|
559
|
+
commonRequestWidthParams,
|
|
560
|
+
commonRequest,
|
|
561
|
+
onSure: async (value) => {
|
|
562
|
+
form.setFieldsValue(value);
|
|
563
|
+
},
|
|
564
|
+
disabled: readonly,
|
|
565
|
+
CustomModalComponent,
|
|
566
|
+
langId
|
|
653
567
|
}
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
case "date-picker":
|
|
571
|
+
case "time-picker":
|
|
572
|
+
case "week-picker":
|
|
573
|
+
case "month-picker":
|
|
574
|
+
case "quarter-picker":
|
|
575
|
+
case "year-picker":
|
|
576
|
+
case "second-picker": {
|
|
577
|
+
const pickerObj = {
|
|
578
|
+
"date-picker": "date",
|
|
579
|
+
"time-picker": "date",
|
|
580
|
+
"week-picker": "week",
|
|
581
|
+
"month-picker": "month",
|
|
582
|
+
"quarter-picker": "quarter",
|
|
583
|
+
"year-picker": "year",
|
|
584
|
+
"second-picker": "time"
|
|
585
|
+
};
|
|
586
|
+
let disabledDateFunc = void 0;
|
|
587
|
+
if (mode === "date-picker") {
|
|
588
|
+
disabledDateFunc = disableDateGoover ? disabledDate : void 0;
|
|
654
589
|
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
590
|
+
return /* @__PURE__ */ jsx(
|
|
591
|
+
DatePicker,
|
|
592
|
+
{
|
|
593
|
+
showTime: mode === "time-picker",
|
|
594
|
+
format: format ? format : void 0,
|
|
595
|
+
picker: pickerObj[mode] || "date",
|
|
596
|
+
disabled: readonly,
|
|
597
|
+
disabledDate: disabledDateFunc,
|
|
598
|
+
placement: "bottomLeft",
|
|
599
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
600
|
+
}
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
case "range-picker":
|
|
604
|
+
return /* @__PURE__ */ jsx(
|
|
605
|
+
DatePicker.RangePicker,
|
|
606
|
+
{
|
|
607
|
+
disabledDate: disableDateGoover ? disabledDate : void 0,
|
|
608
|
+
disabled: readonly,
|
|
609
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
610
|
+
}
|
|
611
|
+
);
|
|
612
|
+
case "multiple-date-picker":
|
|
613
|
+
return /* @__PURE__ */ jsx(DatePicker, { multiple: true, disabled: readonly, style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth } });
|
|
614
|
+
case "radio":
|
|
615
|
+
return /* @__PURE__ */ jsx(
|
|
616
|
+
MyRadio,
|
|
617
|
+
{
|
|
618
|
+
radioAlign,
|
|
619
|
+
commonRequest,
|
|
620
|
+
commonRequestWidthParams,
|
|
621
|
+
item: item.json,
|
|
622
|
+
readonly,
|
|
623
|
+
options: params,
|
|
624
|
+
handleUrlOptions,
|
|
625
|
+
value: formatValue,
|
|
626
|
+
interfaceTypeDict,
|
|
627
|
+
interfaceTypeSysDict,
|
|
628
|
+
actionUrlKey,
|
|
629
|
+
actionUrlExtraParams,
|
|
630
|
+
langConfig,
|
|
631
|
+
onChange: (e) => {
|
|
632
|
+
form.setFieldValue(item.attrid, e.target.value);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
);
|
|
636
|
+
case "checkbox":
|
|
637
|
+
return /* @__PURE__ */ jsx(
|
|
638
|
+
MyCheckbox,
|
|
639
|
+
{
|
|
640
|
+
radioAlign,
|
|
641
|
+
commonRequest,
|
|
642
|
+
commonRequestWidthParams,
|
|
643
|
+
item: item.json,
|
|
644
|
+
readonly,
|
|
645
|
+
options: params,
|
|
646
|
+
value: formatValue,
|
|
647
|
+
handleUrlOptions,
|
|
648
|
+
interfaceTypeDict,
|
|
649
|
+
interfaceTypeSysDict,
|
|
650
|
+
actionUrlKey,
|
|
651
|
+
actionUrlExtraParams,
|
|
652
|
+
onChange: (val) => {
|
|
653
|
+
form.setFieldValue(item.attrid, val.join(","));
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
);
|
|
657
|
+
case "audio":
|
|
658
|
+
case "file":
|
|
659
|
+
case "image":
|
|
660
|
+
case "video":
|
|
661
|
+
return /* @__PURE__ */ jsx(
|
|
662
|
+
MyUpload,
|
|
663
|
+
{
|
|
664
|
+
action: uploadAction && uploadAction("initializationfile"),
|
|
665
|
+
item: item.json,
|
|
666
|
+
uploadType: mode,
|
|
667
|
+
langId,
|
|
668
|
+
list: formatValue,
|
|
669
|
+
readonly,
|
|
670
|
+
relatedid,
|
|
671
|
+
relatedidKey,
|
|
672
|
+
onRemove: (file) => handleOnRemove(file)
|
|
673
|
+
}
|
|
674
|
+
);
|
|
675
|
+
case "cascader":
|
|
676
|
+
return /* @__PURE__ */ jsx(
|
|
677
|
+
MyCascader,
|
|
678
|
+
{
|
|
679
|
+
commonRequestWidthParams,
|
|
680
|
+
commonRequest,
|
|
681
|
+
item: item.json,
|
|
682
|
+
value: item.attrvalue,
|
|
683
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
|
|
684
|
+
interfaceTypeDict,
|
|
685
|
+
interfaceTypeSysDict,
|
|
686
|
+
actionUrlKey,
|
|
687
|
+
actionUrlExtraParams,
|
|
688
|
+
langId
|
|
689
|
+
}
|
|
690
|
+
);
|
|
691
|
+
case "radio-card":
|
|
692
|
+
return /* @__PURE__ */ jsx(
|
|
693
|
+
RadioCard,
|
|
694
|
+
{
|
|
695
|
+
item: item.json,
|
|
696
|
+
readonly,
|
|
697
|
+
onChange: (value) => {
|
|
698
|
+
form.setFieldValue(item.attrid, value);
|
|
699
|
+
},
|
|
700
|
+
langId,
|
|
701
|
+
commonRequestWidthParams
|
|
702
|
+
}
|
|
703
|
+
);
|
|
704
|
+
default:
|
|
705
|
+
return /* @__PURE__ */ jsx(
|
|
706
|
+
Input,
|
|
707
|
+
{
|
|
708
|
+
placeholder: message2 || placeholder,
|
|
709
|
+
...params,
|
|
710
|
+
showCount: true,
|
|
711
|
+
disabled: readonly,
|
|
712
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
713
|
+
}
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
[langId, langConfig]
|
|
718
|
+
);
|
|
716
719
|
const handleRenderItem = ({
|
|
717
720
|
item,
|
|
718
721
|
readonly = false,
|