mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 13:18:55 +08:00
field tooltip for view details
This commit is contained in:
parent
8fafdf077d
commit
7786f0ad48
@ -16,6 +16,7 @@ import Field from '@/components/views/Field';
|
||||
import { Form } from './Form';
|
||||
import { configResponsive, useResponsive } from 'ahooks';
|
||||
import { InfoCircleOutlined } from '@ant-design/icons';
|
||||
import scopes from '@/components/views/Form/scopes';
|
||||
|
||||
configResponsive({
|
||||
small: 0,
|
||||
@ -102,8 +103,11 @@ export function Descriptions(props) {
|
||||
title={group.title && <span>{group.title} {group.tooltip && <Tooltip title={group.tooltip}><InfoCircleOutlined /></Tooltip>}</span>}
|
||||
column={1}>
|
||||
{group.children.map((field: any) => {
|
||||
const label = field.tooltip ? (
|
||||
<><Tooltip title={field.tooltip}><InfoCircleOutlined /></Tooltip> {field.title||field.name}</>
|
||||
) : (field.title||field.name);
|
||||
return (
|
||||
<AntdDescriptions.Item label={field.title||field.name}>
|
||||
<AntdDescriptions.Item label={label}>
|
||||
<Field data={data} viewType={'descriptions'} schema={field} value={get(data, field.name)}/>
|
||||
</AntdDescriptions.Item>
|
||||
)
|
||||
|
@ -13,6 +13,9 @@
|
||||
.ant-drawer-footer {
|
||||
text-align: right;
|
||||
}
|
||||
.ant-descriptions-view .ant-descriptions-item-container .ant-descriptions-item-label {
|
||||
align-items: center;
|
||||
}
|
||||
.page-tabs {
|
||||
.ant-tabs {
|
||||
margin: -24px -24px 8px;
|
||||
|
Loading…
Reference in New Issue
Block a user