szld-libs 0.4.18 → 0.4.20
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 +442 -442
- package/dist/szld-components.umd.js +38 -38
- package/es/components/DynamicForm/func.js +4 -1
- package/es/components/DynamicForm/index.d.ts +2 -0
- package/es/components/DynamicForm/useDynamicForm.js +0 -1
- package/lib/components/DynamicForm/func.js +4 -1
- package/lib/components/DynamicForm/index.d.ts +2 -0
- package/lib/components/DynamicForm/useDynamicForm.js +0 -1
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ const handleGetPlaceholder = (itemWithJson, langId) => {
|
|
|
34
34
|
return defaultMessage;
|
|
35
35
|
};
|
|
36
36
|
const handleSetFormItemInitialValue = (itemWithJson) => {
|
|
37
|
-
var _a, _b, _c, _d;
|
|
37
|
+
var _a, _b, _c, _d, _e, _f;
|
|
38
38
|
const inputType = (_a = itemWithJson.json) == null ? void 0 : _a.input;
|
|
39
39
|
let initialValue = itemWithJson.attrvalue || ((_b = itemWithJson.json) == null ? void 0 : _b.default);
|
|
40
40
|
if (inputType === "label" && initialValue) {
|
|
@@ -78,6 +78,9 @@ const handleSetFormItemInitialValue = (itemWithJson) => {
|
|
|
78
78
|
initialValue = [];
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
+
if (inputType === "time-picker" && !initialValue && ((_e = itemWithJson.json) == null ? void 0 : _e["auto-generate"]) && ((_f = itemWithJson.json) == null ? void 0 : _f["auto-generate-type"]) === "currenttime") {
|
|
82
|
+
initialValue = dayjs(initialValue);
|
|
83
|
+
}
|
|
81
84
|
if (itemWithJson.attrtype === 1) {
|
|
82
85
|
initialValue = handleGetSingleAttrListObj(itemWithJson.children || []);
|
|
83
86
|
}
|
|
@@ -19,6 +19,8 @@ export interface IformConfigItem {
|
|
|
19
19
|
|
|
20
20
|
export interface Ijson {
|
|
21
21
|
hidden?: boolean; // 是否隐藏属性
|
|
22
|
+
'auto-generate'?: boolean; // 是否自动生成时间
|
|
23
|
+
'auto-generate-type'?: string; // 自动生成时间类型
|
|
22
24
|
'instance-source-number'?: string; // 实例来源编号,配合instance-url使用
|
|
23
25
|
'max-tag-count'?: number; // 最大标签数量
|
|
24
26
|
readonly: boolean; // 是否只读属性
|
|
@@ -36,7 +36,7 @@ const handleGetPlaceholder = (itemWithJson, langId) => {
|
|
|
36
36
|
return defaultMessage;
|
|
37
37
|
};
|
|
38
38
|
const handleSetFormItemInitialValue = (itemWithJson) => {
|
|
39
|
-
var _a, _b, _c, _d;
|
|
39
|
+
var _a, _b, _c, _d, _e, _f;
|
|
40
40
|
const inputType = (_a = itemWithJson.json) == null ? void 0 : _a.input;
|
|
41
41
|
let initialValue = itemWithJson.attrvalue || ((_b = itemWithJson.json) == null ? void 0 : _b.default);
|
|
42
42
|
if (inputType === "label" && initialValue) {
|
|
@@ -80,6 +80,9 @@ const handleSetFormItemInitialValue = (itemWithJson) => {
|
|
|
80
80
|
initialValue = [];
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
if (inputType === "time-picker" && !initialValue && ((_e = itemWithJson.json) == null ? void 0 : _e["auto-generate"]) && ((_f = itemWithJson.json) == null ? void 0 : _f["auto-generate-type"]) === "currenttime") {
|
|
84
|
+
initialValue = dayjs(initialValue);
|
|
85
|
+
}
|
|
83
86
|
if (itemWithJson.attrtype === 1) {
|
|
84
87
|
initialValue = handleGetSingleAttrListObj(itemWithJson.children || []);
|
|
85
88
|
}
|
|
@@ -19,6 +19,8 @@ export interface IformConfigItem {
|
|
|
19
19
|
|
|
20
20
|
export interface Ijson {
|
|
21
21
|
hidden?: boolean; // 是否隐藏属性
|
|
22
|
+
'auto-generate'?: boolean; // 是否自动生成时间
|
|
23
|
+
'auto-generate-type'?: string; // 自动生成时间类型
|
|
22
24
|
'instance-source-number'?: string; // 实例来源编号,配合instance-url使用
|
|
23
25
|
'max-tag-count'?: number; // 最大标签数量
|
|
24
26
|
readonly: boolean; // 是否只读属性
|