fix: detail block has no data (#3003)
* chore: add comments * fix: detail block has no data
This commit is contained in:
parent
e74fcc32e7
commit
e73ad1b98b
@ -93,9 +93,6 @@ const useResource = (props: UseResourceProps) => {
|
||||
if (sourceId) {
|
||||
return api.resource(resource, sourceId);
|
||||
}
|
||||
if (record[association?.sourceKey || 'id']) {
|
||||
return api.resource(resource, record[association?.sourceKey || 'id']);
|
||||
}
|
||||
if (record?.__parent?.[association?.sourceKey || 'id']) {
|
||||
return api.resource(resource, record.__parent[association?.sourceKey || 'id']);
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ export const EditRequired = () => {
|
||||
const { t } = useTranslation();
|
||||
const { dn, refresh } = useDesignable();
|
||||
|
||||
// TODO: FormField 好像被弃用了,应该删除掉
|
||||
return !field.readPretty && fieldSchema['x-component'] !== 'FormField' ? (
|
||||
<SchemaSettings.SwitchItem
|
||||
key="required"
|
||||
|
@ -138,6 +138,7 @@ export const GeneralSchemaItems: React.FC<{
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{/* TODO: FormField 好像被弃用了,应该删除掉 */}
|
||||
{!field.readPretty && fieldSchema['x-component'] !== 'FormField' && required && (
|
||||
<SchemaSettings.SwitchItem
|
||||
key="required"
|
||||
|
Loading…
Reference in New Issue
Block a user