();
@@ -308,9 +21,13 @@ export const DatabaseField: any = observer((props) => {
const [activeKey, setActiveKey] = useState(null);
return (
- {
- setActiveKey(key);
- }} accordion>
+ {
+ setActiveKey(key);
+ }}
+ accordion
+ >
{field.value?.map((item, index) => {
const schema = interfaces.get(item.interface);
console.log({ schema });
@@ -332,31 +49,39 @@ export const DatabaseField: any = observer((props) => {
// ]}
header={
<>
- {item.ui && item.ui.title}
- {' '}
- {item.name}
+ {(item.ui && item.ui.title) || 未命名}{' '}
+ {schema.title}
>
}
+ extra={[
+ {
+ field.remove(index);
+ }}
+ />,
+ ]}
key={item.id}
>
);
@@ -369,7 +94,7 @@ export const DatabaseField: any = observer((props) => {
}}
overlay={
}
>
-