fix: logs table layout

This commit is contained in:
Dawn1Ocean
2024-04-16 12:11:42 +08:00
parent 136acf2731
commit a6d435a22f
+13 -5
View File
@@ -34,15 +34,12 @@ const Logs: React.FC = () => {
search: false,
},
description: {
dataIndex: ['time', 'operation', 'target', 'prev', 'curr'],
dataIndex: ['operation', 'target', 'prev', 'curr'],
search: false,
render: (_, row) => {
return (
<div>
{'于 ' +
moment(row.time).format('YYYY-M-D HH:mm:ss') +
' ' +
transInfo(row.operation, 'operation') +
{transInfo(row.operation, 'operation') +
'了' +
transInfo(row.target, 'target') +
':' +
@@ -53,6 +50,17 @@ const Logs: React.FC = () => {
);
},
},
extra: {
dataIndex: 'time',
render: (_: React.ReactNode, row: LogsItem) => {
return (
<div style={{ marginLeft: '3vh' }}>
{moment(row.time).format('YYYY-M-D HH:mm:ss')}
</div>
);
},
search: false,
},
actions: {
render: () => [
<a href="" target="_blank" rel="noopener noreferrer" key="view">