ronds-metadata 1.0.28 → 1.0.32
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.
@@ -121,7 +121,12 @@ var MetadataEdit = function MetadataEdit(props) {
|
|
121
121
|
return;
|
122
122
|
}
|
123
123
|
|
124
|
-
var
|
124
|
+
var _properties_from = form.getFieldValue('properties') || [];
|
125
|
+
|
126
|
+
var _properties_ref = metaSchemaRef.current.properties || [];
|
127
|
+
|
128
|
+
var _properties = _properties_from.length <= _properties_ref.length ? _properties_ref : _properties_from;
|
129
|
+
|
125
130
|
var _curFields = _properties[index];
|
126
131
|
|
127
132
|
if (_curFields && _curFields.id) {
|
@@ -21,12 +21,12 @@ function Index(props) {
|
|
21
21
|
var _extraInfo$disabled, _extraInfo$disabled2;
|
22
22
|
|
23
23
|
var id = props.id,
|
24
|
-
idx = props.idx,
|
25
24
|
refId = props.refId,
|
26
25
|
disabled = props.disabled,
|
27
26
|
isRefForm = props.isRefForm,
|
28
27
|
initEnumValue = props.initEnumValue,
|
29
|
-
field = props.field
|
28
|
+
field = props.field,
|
29
|
+
name = props.name;
|
30
30
|
var formContext = React.useContext(MetadataFormContext) || {};
|
31
31
|
var extraInfo = useGetExtraInfo(formContext.fields, id, formContext.form);
|
32
32
|
|
@@ -105,7 +105,7 @@ function Index(props) {
|
|
105
105
|
disabled: disabled,
|
106
106
|
isRefForm: true,
|
107
107
|
isShowTypeInfo: formContext.isShowTypeInfo,
|
108
|
-
pName: [id],
|
108
|
+
pName: name || [id],
|
109
109
|
field: field ? field : undefined,
|
110
110
|
isObj: true,
|
111
111
|
initEnumValue: initEnumValue
|
@@ -129,18 +129,7 @@ function Index(props) {
|
|
129
129
|
}
|
130
130
|
});
|
131
131
|
}
|
132
|
-
}, [refId]);
|
133
|
-
// if (formContext.initialValues) {
|
134
|
-
// const _myFormValues = formContext.initialValues;
|
135
|
-
// console.log('idx===============', idx, id, _myFormValues);
|
136
|
-
// let myValue: any = _myFormValues[id];
|
137
|
-
// if (!myValue) return;
|
138
|
-
// if ((idx || idx === 0) && myValue?.length > 0) {
|
139
|
-
// myValue = myValue[idx];
|
140
|
-
// }
|
141
|
-
// }
|
142
|
-
// }, [formContext.initialValues, id, idx, onSearch]);
|
143
|
-
|
132
|
+
}, [refId]);
|
144
133
|
React.useEffect(function () {
|
145
134
|
if (refId) {
|
146
135
|
var arr = refId.split(':');
|