|
|
@@ -60,12 +60,13 @@ const Edit = (props: Props) => {
|
|
|
|
|
|
const configToSchema = (list: any[]) => {
|
|
|
const config = {};
|
|
|
- list.forEach((item) => {
|
|
|
+ list.forEach((item, index) => {
|
|
|
config[item.relation] = {
|
|
|
type: 'string',
|
|
|
title: item.relationName,
|
|
|
'x-decorator': 'FormItem',
|
|
|
'x-component': 'Select',
|
|
|
+ 'x-index': index,
|
|
|
'x-component-props': {
|
|
|
placeholder: `请选择${item.relationName}`,
|
|
|
showSearch: true,
|
|
|
@@ -115,7 +116,6 @@ const Edit = (props: Props) => {
|
|
|
});
|
|
|
setInitData(obj);
|
|
|
form.setValues(obj);
|
|
|
- // console.log(props.data,obj)
|
|
|
}, [props.data]);
|
|
|
|
|
|
return (
|