szld-libs 0.3.23 → 0.3.24
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 +2724 -2723
- package/dist/szld-components.umd.js +41 -41
- package/es/components/DynamicForm/useDynamicForm.js +7 -5
- package/es/index.css +1 -1
- package/es/mock/index.js +3 -2
- package/lib/components/DynamicForm/useDynamicForm.js +7 -5
- package/lib/index.css +1 -1
- package/lib/mock/index.js +3 -2
- package/package.json +1 -1
|
@@ -429,18 +429,19 @@ function useDynamicForm(props) {
|
|
|
429
429
|
defaultWidth = 358,
|
|
430
430
|
customWidth = {}
|
|
431
431
|
}) => {
|
|
432
|
-
var _a, _b, _c, _d, _e;
|
|
432
|
+
var _a, _b, _c, _d, _e, _f;
|
|
433
433
|
const mode = item.json.input || "text";
|
|
434
|
+
const format = ((_a = item.json) == null ? void 0 : _a.format) || "";
|
|
434
435
|
const attrid = item.attrid;
|
|
435
436
|
const formatValue = handleSetFormItemInitialValue(item);
|
|
436
|
-
const message2 = ((
|
|
437
|
-
const disableDateGoover = ((
|
|
437
|
+
const message2 = ((_b = item.json) == null ? void 0 : _b["default-prompt"]) || "";
|
|
438
|
+
const disableDateGoover = ((_c = item.json) == null ? void 0 : _c["disable-date-goover"]) || false;
|
|
438
439
|
const placeholder = handleGetPlaceholder(item, langId);
|
|
439
440
|
const params = item.json.length && {
|
|
440
441
|
maxLength: item.json.length
|
|
441
442
|
} || {};
|
|
442
443
|
const itemStyle = formItemStyle.find((v) => v.type === mode);
|
|
443
|
-
let inputWidth = (
|
|
444
|
+
let inputWidth = (_d = item.json) == null ? void 0 : _d["input-width"];
|
|
444
445
|
if (inputWidth) {
|
|
445
446
|
inputWidth = formShowType === "table" ? Number(inputWidth) - 32 : inputWidth;
|
|
446
447
|
}
|
|
@@ -451,7 +452,7 @@ function useDynamicForm(props) {
|
|
|
451
452
|
Input,
|
|
452
453
|
{
|
|
453
454
|
disabled: true,
|
|
454
|
-
value: ((
|
|
455
|
+
value: ((_e = item.json) == null ? void 0 : _e["label-value"]) || item.attrvalue || ((_f = item.json) == null ? void 0 : _f.default) || "-",
|
|
455
456
|
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
456
457
|
}
|
|
457
458
|
);
|
|
@@ -585,6 +586,7 @@ function useDynamicForm(props) {
|
|
|
585
586
|
DatePicker,
|
|
586
587
|
{
|
|
587
588
|
showTime: mode === "time-picker",
|
|
589
|
+
format: format ? format : void 0,
|
|
588
590
|
picker: pickerObj[mode] || "date",
|
|
589
591
|
disabled: readonly,
|
|
590
592
|
disabledDate: disabledDateFunc,
|
package/es/index.css
CHANGED
package/es/mock/index.js
CHANGED
|
@@ -53,7 +53,7 @@ const attrList = [
|
|
|
53
53
|
attrid: "7BB9BE8A96824CCF89B721C8F1AF9F38",
|
|
54
54
|
attrname: "Feeding Time",
|
|
55
55
|
attrtype: 0,
|
|
56
|
-
info: '{"input":"second-picker"
|
|
56
|
+
info: '{\r\n "input": "second-picker",\r\n "dataType": "string",\r\n "length": 200,\r\n "input-width": 240,\r\n "format": "HH:mm"\r\n}',
|
|
57
57
|
info_base64: 0,
|
|
58
58
|
createtime: "2026-02-11 15:12:26",
|
|
59
59
|
attrvalue: "",
|
|
@@ -63,7 +63,8 @@ const attrList = [
|
|
|
63
63
|
input: "second-picker",
|
|
64
64
|
dataType: "string",
|
|
65
65
|
length: 200,
|
|
66
|
-
"input-width": 240
|
|
66
|
+
"input-width": 240,
|
|
67
|
+
format: "HH:mm"
|
|
67
68
|
}
|
|
68
69
|
},
|
|
69
70
|
{
|
|
@@ -430,18 +430,19 @@ function useDynamicForm(props) {
|
|
|
430
430
|
defaultWidth = 358,
|
|
431
431
|
customWidth = {}
|
|
432
432
|
}) => {
|
|
433
|
-
var _a, _b, _c, _d, _e;
|
|
433
|
+
var _a, _b, _c, _d, _e, _f;
|
|
434
434
|
const mode = item.json.input || "text";
|
|
435
|
+
const format = ((_a = item.json) == null ? void 0 : _a.format) || "";
|
|
435
436
|
const attrid = item.attrid;
|
|
436
437
|
const formatValue = func.handleSetFormItemInitialValue(item);
|
|
437
|
-
const message2 = ((
|
|
438
|
-
const disableDateGoover = ((
|
|
438
|
+
const message2 = ((_b = item.json) == null ? void 0 : _b["default-prompt"]) || "";
|
|
439
|
+
const disableDateGoover = ((_c = item.json) == null ? void 0 : _c["disable-date-goover"]) || false;
|
|
439
440
|
const placeholder = func.handleGetPlaceholder(item, langId);
|
|
440
441
|
const params = item.json.length && {
|
|
441
442
|
maxLength: item.json.length
|
|
442
443
|
} || {};
|
|
443
444
|
const itemStyle = formItemStyle.find((v) => v.type === mode);
|
|
444
|
-
let inputWidth = (
|
|
445
|
+
let inputWidth = (_d = item.json) == null ? void 0 : _d["input-width"];
|
|
445
446
|
if (inputWidth) {
|
|
446
447
|
inputWidth = formShowType === "table" ? Number(inputWidth) - 32 : inputWidth;
|
|
447
448
|
}
|
|
@@ -452,7 +453,7 @@ function useDynamicForm(props) {
|
|
|
452
453
|
antd.Input,
|
|
453
454
|
{
|
|
454
455
|
disabled: true,
|
|
455
|
-
value: ((
|
|
456
|
+
value: ((_e = item.json) == null ? void 0 : _e["label-value"]) || item.attrvalue || ((_f = item.json) == null ? void 0 : _f.default) || "-",
|
|
456
457
|
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
457
458
|
}
|
|
458
459
|
);
|
|
@@ -586,6 +587,7 @@ function useDynamicForm(props) {
|
|
|
586
587
|
antd.DatePicker,
|
|
587
588
|
{
|
|
588
589
|
showTime: mode === "time-picker",
|
|
590
|
+
format: format ? format : void 0,
|
|
589
591
|
picker: pickerObj[mode] || "date",
|
|
590
592
|
disabled: readonly,
|
|
591
593
|
disabledDate: disabledDateFunc,
|
package/lib/index.css
CHANGED
package/lib/mock/index.js
CHANGED
|
@@ -55,7 +55,7 @@ const attrList = [
|
|
|
55
55
|
attrid: "7BB9BE8A96824CCF89B721C8F1AF9F38",
|
|
56
56
|
attrname: "Feeding Time",
|
|
57
57
|
attrtype: 0,
|
|
58
|
-
info: '{"input":"second-picker"
|
|
58
|
+
info: '{\r\n "input": "second-picker",\r\n "dataType": "string",\r\n "length": 200,\r\n "input-width": 240,\r\n "format": "HH:mm"\r\n}',
|
|
59
59
|
info_base64: 0,
|
|
60
60
|
createtime: "2026-02-11 15:12:26",
|
|
61
61
|
attrvalue: "",
|
|
@@ -65,7 +65,8 @@ const attrList = [
|
|
|
65
65
|
input: "second-picker",
|
|
66
66
|
dataType: "string",
|
|
67
67
|
length: 200,
|
|
68
|
-
"input-width": 240
|
|
68
|
+
"input-width": 240,
|
|
69
|
+
format: "HH:mm"
|
|
69
70
|
}
|
|
70
71
|
},
|
|
71
72
|
{
|