From 7ef3de1367a08511e48869f71b1ce45a0c57fdec Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 12 Mar 2022 16:14:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=80=E5=87=BA=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=92=8C=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/index.tsx | 4 ++-- src/pages/crontab/index.tsx | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index dd4edbeb..1b6cc552 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -272,7 +272,7 @@ export default function (props: any) { collapsed={collapsed} rightContentRender={() => ctx.isPhone && ( - + } /> admin @@ -289,7 +289,7 @@ export default function (props: any) { }} > {!collapsed && !ctx.isPhone && ( - + } /> admin diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index 9a670ad0..1d128148 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -96,7 +96,7 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => { style={{ cursor: 'point' }} onClick={(e) => { e.stopPropagation(); - setSearchText(`label:${label}`); + setSearchValue(`label:${label}`); }} > {label} @@ -364,6 +364,7 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => { const [tableScrollHeight, setTableScrollHeight] = useState(); const [isDetailModalVisible, setIsDetailModalVisible] = useState(false); const [detailCron, setDetailCron] = useState(); + const [searchValue, setSearchValue] = useState(''); const goToScriptManager = (record: any) => { const cmd = record.command.split(' ') as string[]; @@ -842,7 +843,8 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => { enterButton allowClear loading={loading} - value={searchText} + value={searchValue} + onChange={(e) => setSearchValue(e.target.value)} onSearch={onSearch} />,