fix: field tooltip
This commit is contained in:
parent
db103c50f0
commit
c5b8b44a12
@ -58,7 +58,7 @@ export function Descriptions(props) {
|
|||||||
const resourceKey = props.resourceKey || record[associationField.targetKey||rowKey];
|
const resourceKey = props.resourceKey || record[associationField.targetKey||rowKey];
|
||||||
const associatedKey = props.associatedKey || record[associationField.sourceKey||'id'];
|
const associatedKey = props.associatedKey || record[associationField.sourceKey||'id'];
|
||||||
|
|
||||||
console.log({resourceKey, data: record, associatedKey, associationField})
|
// console.log({resourceKey, data: record, associatedKey, associationField})
|
||||||
|
|
||||||
const { data = {}, loading, refresh } = useRequest(() => {
|
const { data = {}, loading, refresh } = useRequest(() => {
|
||||||
return api.resource(resourceName).get({
|
return api.resource(resourceName).get({
|
||||||
@ -104,7 +104,7 @@ export function Descriptions(props) {
|
|||||||
column={1}>
|
column={1}>
|
||||||
{group.children.map((field: any) => {
|
{group.children.map((field: any) => {
|
||||||
const label = field.tooltip ? (
|
const label = field.tooltip ? (
|
||||||
<><Tooltip title={field.tooltip}><InfoCircleOutlined /></Tooltip> {field.title||field.name}</>
|
<>{field.title||field.name} <Tooltip title={field.tooltip}><InfoCircleOutlined /></Tooltip></>
|
||||||
) : (field.title||field.name);
|
) : (field.title||field.name);
|
||||||
return (
|
return (
|
||||||
<AntdDescriptions.Item label={label}>
|
<AntdDescriptions.Item label={label}>
|
||||||
|
Loading…
Reference in New Issue
Block a user