szld-libs 0.4.5 → 0.4.7
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.
|
@@ -117,11 +117,23 @@ function useDynamicForm(props) {
|
|
|
117
117
|
case "range-picker":
|
|
118
118
|
baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.map((d) => d == null ? void 0 : d.format(format || "YYYY-MM-DD"));
|
|
119
119
|
baseProps.getValueProps = (value) => {
|
|
120
|
-
if (!(value == null ? void 0 : value.length)
|
|
120
|
+
if (!(value == null ? void 0 : value.length))
|
|
121
121
|
return { value: null };
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
if (typeof value === "string") {
|
|
123
|
+
const arr = value.split("~");
|
|
124
|
+
if (arr.length > 1) {
|
|
125
|
+
return {
|
|
126
|
+
value: (arr == null ? void 0 : arr.map((v) => dayjs(v))) || null
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return { value: [dayjs(value), dayjs(value)] };
|
|
130
|
+
}
|
|
131
|
+
if (Array.isArray(value)) {
|
|
132
|
+
return {
|
|
133
|
+
value: (value == null ? void 0 : value.map((v) => dayjs(v))) || null
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return null;
|
|
125
137
|
};
|
|
126
138
|
break;
|
|
127
139
|
case "multiple-date-picker":
|
package/es/mock/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const attrList = [
|
|
|
8
8
|
attrid: "30BDE6E7977E40069B55DDE61C8795AE",
|
|
9
9
|
attrname: "Dates",
|
|
10
10
|
attrtype: 0,
|
|
11
|
-
info: '{"input":"
|
|
11
|
+
info: '{"input":"range-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
|
|
12
12
|
info_base64: 0,
|
|
13
13
|
createtime: "2026-02-11 15:12:26",
|
|
14
14
|
attrvalue: "",
|
|
@@ -118,11 +118,23 @@ function useDynamicForm(props) {
|
|
|
118
118
|
case "range-picker":
|
|
119
119
|
baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.map((d) => d == null ? void 0 : d.format(format || "YYYY-MM-DD"));
|
|
120
120
|
baseProps.getValueProps = (value) => {
|
|
121
|
-
if (!(value == null ? void 0 : value.length)
|
|
121
|
+
if (!(value == null ? void 0 : value.length))
|
|
122
122
|
return { value: null };
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
if (typeof value === "string") {
|
|
124
|
+
const arr = value.split("~");
|
|
125
|
+
if (arr.length > 1) {
|
|
126
|
+
return {
|
|
127
|
+
value: (arr == null ? void 0 : arr.map((v) => dayjs(v))) || null
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return { value: [dayjs(value), dayjs(value)] };
|
|
131
|
+
}
|
|
132
|
+
if (Array.isArray(value)) {
|
|
133
|
+
return {
|
|
134
|
+
value: (value == null ? void 0 : value.map((v) => dayjs(v))) || null
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
return null;
|
|
126
138
|
};
|
|
127
139
|
break;
|
|
128
140
|
case "multiple-date-picker":
|
package/lib/mock/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const attrList = [
|
|
|
10
10
|
attrid: "30BDE6E7977E40069B55DDE61C8795AE",
|
|
11
11
|
attrname: "Dates",
|
|
12
12
|
attrtype: 0,
|
|
13
|
-
info: '{"input":"
|
|
13
|
+
info: '{"input":"range-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
|
|
14
14
|
info_base64: 0,
|
|
15
15
|
createtime: "2026-02-11 15:12:26",
|
|
16
16
|
attrvalue: "",
|