szld-libs 0.4.6 → 0.4.8
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 +1890 -1878
- package/dist/szld-components.umd.js +31 -31
- package/es/components/DynamicForm/useDynamicForm.js +16 -4
- package/es/hooks/useUniversalTable.js +4 -0
- package/es/mock/index.js +1 -1
- package/lib/components/DynamicForm/useDynamicForm.js +16 -4
- package/lib/hooks/useUniversalTable.js +4 -0
- package/lib/mock/index.js +1 -1
- package/package.json +1 -1
|
@@ -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":
|
|
@@ -391,6 +391,10 @@ function useUniversalTable() {
|
|
|
391
391
|
const updatedSelList = currentSelList.map((item) => {
|
|
392
392
|
var _a, _b;
|
|
393
393
|
const { input, inputType } = (item == null ? void 0 : item.renderdata) || {};
|
|
394
|
+
const defaultRenderData = item == null ? void 0 : item["default-render-data"];
|
|
395
|
+
if (defaultRenderData) {
|
|
396
|
+
return item;
|
|
397
|
+
}
|
|
394
398
|
if (input === "tab" && (inputType == null ? void 0 : inputType.startsWith("local-")) && (tabItems == null ? void 0 : tabItems.length) && (currentActive || currentActive === 0)) {
|
|
395
399
|
const tabConfig = currentSelList.find((item2) => input === "tab" && (inputType == null ? void 0 : inputType.startsWith("local-")));
|
|
396
400
|
const selectedPackage = tabItems[currentActive];
|
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":
|
|
@@ -392,6 +392,10 @@ function useUniversalTable() {
|
|
|
392
392
|
const updatedSelList = currentSelList.map((item) => {
|
|
393
393
|
var _a, _b;
|
|
394
394
|
const { input, inputType } = (item == null ? void 0 : item.renderdata) || {};
|
|
395
|
+
const defaultRenderData = item == null ? void 0 : item["default-render-data"];
|
|
396
|
+
if (defaultRenderData) {
|
|
397
|
+
return item;
|
|
398
|
+
}
|
|
395
399
|
if (input === "tab" && (inputType == null ? void 0 : inputType.startsWith("local-")) && (tabItems == null ? void 0 : tabItems.length) && (currentActive || currentActive === 0)) {
|
|
396
400
|
const tabConfig = currentSelList.find((item2) => input === "tab" && (inputType == null ? void 0 : inputType.startsWith("local-")));
|
|
397
401
|
const selectedPackage = tabItems[currentActive];
|
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: "",
|