szld-libs 0.4.2 → 0.4.5
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 +633 -625
- package/dist/szld-components.umd.js +18 -18
- package/es/components/DynamicForm/useDynamicForm.js +14 -3
- package/es/index.js +9 -1
- package/es/mock/index.js +39 -24
- package/lib/components/DynamicForm/useDynamicForm.js +14 -3
- package/lib/index.js +9 -1
- package/lib/mock/index.js +39 -24
- package/package.json +1 -1
|
@@ -126,9 +126,20 @@ function useDynamicForm(props) {
|
|
|
126
126
|
break;
|
|
127
127
|
case "multiple-date-picker":
|
|
128
128
|
baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.map((d) => d == null ? void 0 : d.format(format || "YYYY-MM-DD"));
|
|
129
|
-
baseProps.getValueProps = (value) =>
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
baseProps.getValueProps = (value) => {
|
|
130
|
+
if (typeof value === "string") {
|
|
131
|
+
const arr = value.split(",");
|
|
132
|
+
return {
|
|
133
|
+
value: (arr == null ? void 0 : arr.map((v) => dayjs(v))) || null
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
if (Array.isArray(value)) {
|
|
137
|
+
return {
|
|
138
|
+
value: (value == null ? void 0 : value.map((v) => dayjs(v))) || null
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
return null;
|
|
142
|
+
};
|
|
132
143
|
break;
|
|
133
144
|
}
|
|
134
145
|
return baseProps;
|
package/es/index.js
CHANGED
|
@@ -24,7 +24,15 @@ const Demo = () => {
|
|
|
24
24
|
setList(handleAttrList(attrList));
|
|
25
25
|
setTimeout(() => {
|
|
26
26
|
form.setFieldsValue({
|
|
27
|
-
|
|
27
|
+
customFormList: [
|
|
28
|
+
{
|
|
29
|
+
"30BDE6E7977E40069B55DDE61C8795AE": "2026-05-29",
|
|
30
|
+
"38A7DADC6D64492D83DA607EC121A02D": "12",
|
|
31
|
+
"7BB9BE8A96824CCF89B721C8F1AF9F38": "7:00am – 7:30am",
|
|
32
|
+
"665F59E637664037939512C9877EAD75": "2222",
|
|
33
|
+
"290CF33D2AAD45399987987FAB80900B": "4"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
28
36
|
});
|
|
29
37
|
}, 2e3);
|
|
30
38
|
}, []);
|
package/es/mock/index.js
CHANGED
|
@@ -2,63 +2,78 @@ const baseAttrList = [];
|
|
|
2
2
|
const attrList = [
|
|
3
3
|
{
|
|
4
4
|
xh: 1,
|
|
5
|
-
asid: "
|
|
5
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
6
6
|
astype: 0,
|
|
7
|
-
tname: "
|
|
8
|
-
attrid: "
|
|
9
|
-
attrname: "
|
|
7
|
+
tname: "tsyy_table2",
|
|
8
|
+
attrid: "30BDE6E7977E40069B55DDE61C8795AE",
|
|
9
|
+
attrname: "Dates",
|
|
10
10
|
attrtype: 0,
|
|
11
|
-
info: '{"input":"multiple-date-picker","dataType":"
|
|
11
|
+
info: '{"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
|
|
12
12
|
info_base64: 0,
|
|
13
|
-
createtime: "2026-
|
|
13
|
+
createtime: "2026-02-11 15:12:26",
|
|
14
14
|
attrvalue: "",
|
|
15
15
|
serialnum: 1,
|
|
16
16
|
children: []
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
xh: 2,
|
|
20
|
-
asid: "
|
|
20
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
21
21
|
astype: 0,
|
|
22
|
-
tname: "
|
|
23
|
-
attrid: "
|
|
24
|
-
attrname: "
|
|
22
|
+
tname: "tsyy_table2",
|
|
23
|
+
attrid: "38A7DADC6D64492D83DA607EC121A02D",
|
|
24
|
+
attrname: "How Many Times",
|
|
25
25
|
attrtype: 0,
|
|
26
|
-
info: '{"input":"
|
|
26
|
+
info: '{"input":"text","dataType":"string","length":10,"input-width":140,"must":true}',
|
|
27
27
|
info_base64: 0,
|
|
28
|
-
createtime: "2026-
|
|
28
|
+
createtime: "2026-02-11 15:12:26",
|
|
29
29
|
attrvalue: "",
|
|
30
30
|
serialnum: 2,
|
|
31
31
|
children: []
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
xh: 3,
|
|
35
|
-
asid: "
|
|
35
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
36
36
|
astype: 0,
|
|
37
|
-
tname: "
|
|
38
|
-
attrid: "
|
|
39
|
-
attrname: "
|
|
37
|
+
tname: "tsyy_table2",
|
|
38
|
+
attrid: "7BB9BE8A96824CCF89B721C8F1AF9F38",
|
|
39
|
+
attrname: "Feeding Time",
|
|
40
40
|
attrtype: 0,
|
|
41
|
-
info: '{"input":"mult-select","dataType":"string","length":100,"inputType":"local","data":["5:00pm – 5:30pm", "5:30pm – 6:00pm", "6:00pm – 6:30pm", "6:30pm – 7:00pm", "7:00pm – 7:30pm", "7:30pm – 8:00pm"],"must":true}',
|
|
41
|
+
info: '{"input":"mult-select","dataType":"string","length":100,"inputType":"local","data":["7:00am – 7:30am", "7:30am – 8:00am", "8:00am – 8:30am", "8:30am – 9:00am", "9:00am – 9:30am", "9:30am – 10:00am", "10:00am – 10:30am", "10:30am – 11:00am", "11:00am – 11:30am", "11:30am – 12:00pm", "12:00pm – 12:30pm", "12:30pm – 1:00pm", "1:00pm – 1:30pm", "1:30pm – 2:00pm", "2:00pm – 2:30pm", "2:30pm – 3:00pm", "3:00pm – 3:30pm", "3:30pm – 4:00pm", "4:00pm – 4:30pm", "4:30pm – 5:00pm", "5:00pm – 5:30pm", "5:30pm – 6:00pm", "6:00pm – 6:30pm", "6:30pm – 7:00pm", "7:00pm – 7:30pm", "7:30pm – 8:00pm"],"must":true}',
|
|
42
42
|
info_base64: 0,
|
|
43
|
-
createtime: "2026-
|
|
43
|
+
createtime: "2026-02-11 15:12:26",
|
|
44
44
|
attrvalue: "",
|
|
45
45
|
serialnum: 3,
|
|
46
46
|
children: []
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
xh: 4,
|
|
50
|
-
asid: "
|
|
50
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
51
51
|
astype: 0,
|
|
52
|
-
tname: "
|
|
53
|
-
attrid: "
|
|
54
|
-
attrname: "
|
|
52
|
+
tname: "tsyy_table2",
|
|
53
|
+
attrid: "665F59E637664037939512C9877EAD75",
|
|
54
|
+
attrname: "Meds Info",
|
|
55
55
|
attrtype: 0,
|
|
56
|
-
info: '{"input":"text","dataType":"string","length":
|
|
56
|
+
info: '{"input":"text","dataType":"string","length":500,"input-width":240}',
|
|
57
57
|
info_base64: 0,
|
|
58
|
-
createtime: "2026-
|
|
58
|
+
createtime: "2026-02-11 15:12:26",
|
|
59
59
|
attrvalue: "",
|
|
60
60
|
serialnum: 4,
|
|
61
61
|
children: []
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
xh: 5,
|
|
65
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
66
|
+
astype: 0,
|
|
67
|
+
tname: "tsyy_table2",
|
|
68
|
+
attrid: "290CF33D2AAD45399987987FAB80900B",
|
|
69
|
+
attrname: "Feeding Instruction",
|
|
70
|
+
attrtype: 0,
|
|
71
|
+
info: '{"input":"text","dataType":"string","length":500,"input-width":340}',
|
|
72
|
+
info_base64: 0,
|
|
73
|
+
createtime: "2026-02-11 15:12:26",
|
|
74
|
+
attrvalue: "",
|
|
75
|
+
serialnum: 5,
|
|
76
|
+
children: []
|
|
62
77
|
}
|
|
63
78
|
];
|
|
64
79
|
const langConfig = [
|
|
@@ -127,9 +127,20 @@ function useDynamicForm(props) {
|
|
|
127
127
|
break;
|
|
128
128
|
case "multiple-date-picker":
|
|
129
129
|
baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.map((d) => d == null ? void 0 : d.format(format || "YYYY-MM-DD"));
|
|
130
|
-
baseProps.getValueProps = (value) =>
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
baseProps.getValueProps = (value) => {
|
|
131
|
+
if (typeof value === "string") {
|
|
132
|
+
const arr = value.split(",");
|
|
133
|
+
return {
|
|
134
|
+
value: (arr == null ? void 0 : arr.map((v) => dayjs(v))) || null
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
if (Array.isArray(value)) {
|
|
138
|
+
return {
|
|
139
|
+
value: (value == null ? void 0 : value.map((v) => dayjs(v))) || null
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
};
|
|
133
144
|
break;
|
|
134
145
|
}
|
|
135
146
|
return baseProps;
|
package/lib/index.js
CHANGED
|
@@ -25,7 +25,15 @@ const Demo = () => {
|
|
|
25
25
|
setList(method.handleAttrList(mock.attrList));
|
|
26
26
|
setTimeout(() => {
|
|
27
27
|
form.setFieldsValue({
|
|
28
|
-
|
|
28
|
+
customFormList: [
|
|
29
|
+
{
|
|
30
|
+
"30BDE6E7977E40069B55DDE61C8795AE": "2026-05-29",
|
|
31
|
+
"38A7DADC6D64492D83DA607EC121A02D": "12",
|
|
32
|
+
"7BB9BE8A96824CCF89B721C8F1AF9F38": "7:00am – 7:30am",
|
|
33
|
+
"665F59E637664037939512C9877EAD75": "2222",
|
|
34
|
+
"290CF33D2AAD45399987987FAB80900B": "4"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
29
37
|
});
|
|
30
38
|
}, 2e3);
|
|
31
39
|
}, []);
|
package/lib/mock/index.js
CHANGED
|
@@ -4,63 +4,78 @@ const baseAttrList = [];
|
|
|
4
4
|
const attrList = [
|
|
5
5
|
{
|
|
6
6
|
xh: 1,
|
|
7
|
-
asid: "
|
|
7
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
8
8
|
astype: 0,
|
|
9
|
-
tname: "
|
|
10
|
-
attrid: "
|
|
11
|
-
attrname: "
|
|
9
|
+
tname: "tsyy_table2",
|
|
10
|
+
attrid: "30BDE6E7977E40069B55DDE61C8795AE",
|
|
11
|
+
attrname: "Dates",
|
|
12
12
|
attrtype: 0,
|
|
13
|
-
info: '{"input":"multiple-date-picker","dataType":"
|
|
13
|
+
info: '{"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
|
|
14
14
|
info_base64: 0,
|
|
15
|
-
createtime: "2026-
|
|
15
|
+
createtime: "2026-02-11 15:12:26",
|
|
16
16
|
attrvalue: "",
|
|
17
17
|
serialnum: 1,
|
|
18
18
|
children: []
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
xh: 2,
|
|
22
|
-
asid: "
|
|
22
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
23
23
|
astype: 0,
|
|
24
|
-
tname: "
|
|
25
|
-
attrid: "
|
|
26
|
-
attrname: "
|
|
24
|
+
tname: "tsyy_table2",
|
|
25
|
+
attrid: "38A7DADC6D64492D83DA607EC121A02D",
|
|
26
|
+
attrname: "How Many Times",
|
|
27
27
|
attrtype: 0,
|
|
28
|
-
info: '{"input":"
|
|
28
|
+
info: '{"input":"text","dataType":"string","length":10,"input-width":140,"must":true}',
|
|
29
29
|
info_base64: 0,
|
|
30
|
-
createtime: "2026-
|
|
30
|
+
createtime: "2026-02-11 15:12:26",
|
|
31
31
|
attrvalue: "",
|
|
32
32
|
serialnum: 2,
|
|
33
33
|
children: []
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
xh: 3,
|
|
37
|
-
asid: "
|
|
37
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
38
38
|
astype: 0,
|
|
39
|
-
tname: "
|
|
40
|
-
attrid: "
|
|
41
|
-
attrname: "
|
|
39
|
+
tname: "tsyy_table2",
|
|
40
|
+
attrid: "7BB9BE8A96824CCF89B721C8F1AF9F38",
|
|
41
|
+
attrname: "Feeding Time",
|
|
42
42
|
attrtype: 0,
|
|
43
|
-
info: '{"input":"mult-select","dataType":"string","length":100,"inputType":"local","data":["5:00pm – 5:30pm", "5:30pm – 6:00pm", "6:00pm – 6:30pm", "6:30pm – 7:00pm", "7:00pm – 7:30pm", "7:30pm – 8:00pm"],"must":true}',
|
|
43
|
+
info: '{"input":"mult-select","dataType":"string","length":100,"inputType":"local","data":["7:00am – 7:30am", "7:30am – 8:00am", "8:00am – 8:30am", "8:30am – 9:00am", "9:00am – 9:30am", "9:30am – 10:00am", "10:00am – 10:30am", "10:30am – 11:00am", "11:00am – 11:30am", "11:30am – 12:00pm", "12:00pm – 12:30pm", "12:30pm – 1:00pm", "1:00pm – 1:30pm", "1:30pm – 2:00pm", "2:00pm – 2:30pm", "2:30pm – 3:00pm", "3:00pm – 3:30pm", "3:30pm – 4:00pm", "4:00pm – 4:30pm", "4:30pm – 5:00pm", "5:00pm – 5:30pm", "5:30pm – 6:00pm", "6:00pm – 6:30pm", "6:30pm – 7:00pm", "7:00pm – 7:30pm", "7:30pm – 8:00pm"],"must":true}',
|
|
44
44
|
info_base64: 0,
|
|
45
|
-
createtime: "2026-
|
|
45
|
+
createtime: "2026-02-11 15:12:26",
|
|
46
46
|
attrvalue: "",
|
|
47
47
|
serialnum: 3,
|
|
48
48
|
children: []
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
xh: 4,
|
|
52
|
-
asid: "
|
|
52
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
53
53
|
astype: 0,
|
|
54
|
-
tname: "
|
|
55
|
-
attrid: "
|
|
56
|
-
attrname: "
|
|
54
|
+
tname: "tsyy_table2",
|
|
55
|
+
attrid: "665F59E637664037939512C9877EAD75",
|
|
56
|
+
attrname: "Meds Info",
|
|
57
57
|
attrtype: 0,
|
|
58
|
-
info: '{"input":"text","dataType":"string","length":
|
|
58
|
+
info: '{"input":"text","dataType":"string","length":500,"input-width":240}',
|
|
59
59
|
info_base64: 0,
|
|
60
|
-
createtime: "2026-
|
|
60
|
+
createtime: "2026-02-11 15:12:26",
|
|
61
61
|
attrvalue: "",
|
|
62
62
|
serialnum: 4,
|
|
63
63
|
children: []
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
xh: 5,
|
|
67
|
+
asid: "06C6CE201AB44B2CAAB11C753374AA40",
|
|
68
|
+
astype: 0,
|
|
69
|
+
tname: "tsyy_table2",
|
|
70
|
+
attrid: "290CF33D2AAD45399987987FAB80900B",
|
|
71
|
+
attrname: "Feeding Instruction",
|
|
72
|
+
attrtype: 0,
|
|
73
|
+
info: '{"input":"text","dataType":"string","length":500,"input-width":340}',
|
|
74
|
+
info_base64: 0,
|
|
75
|
+
createtime: "2026-02-11 15:12:26",
|
|
76
|
+
attrvalue: "",
|
|
77
|
+
serialnum: 5,
|
|
78
|
+
children: []
|
|
64
79
|
}
|
|
65
80
|
];
|
|
66
81
|
const langConfig = [
|