From 0e602224cb5e531a8970d4abfce309e34df4fe7b Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Wed, 15 Nov 2023 15:34:16 +0800 Subject: [PATCH] Optimize log page --- src/pages/system/Log.tsx | 121 ++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 59 deletions(-) diff --git a/src/pages/system/Log.tsx b/src/pages/system/Log.tsx index b3d62de..2bc9cf4 100644 --- a/src/pages/system/Log.tsx +++ b/src/pages/system/Log.tsx @@ -261,6 +261,66 @@ const Log: React.FC = () => { JSON.stringify(tableParams.pagination?.current) ]) + const toolbar = ( + + + + 请求 Url + + } + suffix={ + <> + {!isRegexLegal ? ( + 非法表达式 + ) : undefined} + + .* + + + } + allowClear + value={searchRequestUrl} + onChange={handleOnSearchUrlChange} + onKeyDown={handleOnSearchUrlKeyDown} + status={isRegexLegal ? undefined : 'error'} + /> + + + + + + + 查询 + + + + ) + + const table = ( + + record.id} + pagination={tableParams.pagination} + loading={loading} + onChange={handleOnTableChange} + /> + + ) + return ( <> @@ -270,65 +330,8 @@ const Log: React.FC = () => { autoHideWaitingTime={500} > - - - - 请求 Url - - } - suffix={ - <> - {!isRegexLegal ? ( - - 非法表达式 - - ) : undefined} - - .* - - - } - allowClear - value={searchRequestUrl} - onChange={handleOnSearchUrlChange} - onKeyDown={handleOnSearchUrlKeyDown} - status={isRegexLegal ? undefined : 'error'} - /> - - - - - - - 查询 - - - - - record.id} - pagination={tableParams.pagination} - loading={loading} - onChange={handleOnTableChange} - /> - + {toolbar} + {table}