From a6d435a22faf1ef2b6cabb3bbb5144b7786a8e86 Mon Sep 17 00:00:00 2001 From: Dawn1Ocean <1785590531@qq.com> Date: Tue, 16 Apr 2024 12:11:42 +0800 Subject: [PATCH] fix: logs table layout --- src/pages/Admin/Logs/index.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/pages/Admin/Logs/index.tsx b/src/pages/Admin/Logs/index.tsx index b332f17..e99fe76 100644 --- a/src/pages/Admin/Logs/index.tsx +++ b/src/pages/Admin/Logs/index.tsx @@ -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 (
- {'于 ' + - 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 ( +
+ {moment(row.time).format('YYYY-M-D HH:mm:ss')} +
+ ); + }, + search: false, + }, actions: { render: () => [