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} />,