mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 21:28:34 +08:00
fix(audit-logs): Add ellipsis feature to table columns (#1603)
* fix: text is so long * feat: don't need rowSelection
This commit is contained in:
parent
e5ee716702
commit
92d0eab0cc
@ -1,4 +1,4 @@
|
||||
import { useCompile } from '@nocobase/client';
|
||||
import { EllipsisWithTooltip, useCompile } from '@nocobase/client';
|
||||
import React from 'react';
|
||||
import { observer, useField } from '@formily/react';
|
||||
|
||||
@ -8,5 +8,9 @@ export const AuditLogsField = observer(() => {
|
||||
if (!field.value) {
|
||||
return null;
|
||||
}
|
||||
return <div>{field.value?.uiSchema?.title ? compile(field.value?.uiSchema?.title) : field.value.name}</div>;
|
||||
return (
|
||||
<EllipsisWithTooltip ellipsis>
|
||||
{field.value?.uiSchema?.title ? compile(field.value?.uiSchema?.title) : field.value.name}
|
||||
</EllipsisWithTooltip>
|
||||
);
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FormProvider, SchemaComponent, useRecord } from '@nocobase/client';
|
||||
import { EllipsisWithTooltip, FormProvider, SchemaComponent, useRecord } from '@nocobase/client';
|
||||
import React from 'react';
|
||||
import { observer, useField } from '@formily/react';
|
||||
|
||||
@ -19,5 +19,5 @@ export const AuditLogsValue = observer(() => {
|
||||
</FormProvider>
|
||||
);
|
||||
}
|
||||
return <div>{field.value ? JSON.stringify(field.value) : null}</div>;
|
||||
return <EllipsisWithTooltip ellipsis>{field.value ? JSON.stringify(field.value) : null}</EllipsisWithTooltip>;
|
||||
});
|
||||
|
@ -255,9 +255,7 @@ export const AuditLogsViewActionInitializer = (props) => {
|
||||
type: 'array',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
},
|
||||
rowSelection: false,
|
||||
useProps: '{{ useTableFieldProps }}',
|
||||
},
|
||||
properties: {
|
||||
|
Loading…
Reference in New Issue
Block a user