修复退出登录和定时任务搜索

This commit is contained in:
whyour 2022-03-12 16:14:18 +08:00
parent ce6aa23d5b
commit 7ef3de1367
2 changed files with 6 additions and 4 deletions

View File

@ -272,7 +272,7 @@ export default function (props: any) {
collapsed={collapsed}
rightContentRender={() =>
ctx.isPhone && (
<Dropdown overlay={menu} trigger={['click', 'hover']}>
<Dropdown overlay={menu} placement="bottomRight" trigger={['click']}>
<span className="side-menu-user-wrapper">
<Avatar shape="square" size="small" icon={<UserOutlined />} />
<span style={{ marginLeft: 5 }}>admin</span>
@ -289,7 +289,7 @@ export default function (props: any) {
}}
>
{!collapsed && !ctx.isPhone && (
<Dropdown overlay={menu} trigger={['hover']}>
<Dropdown overlay={menu} placement="topLeft" trigger={['hover']}>
<span className="side-menu-user-wrapper">
<Avatar shape="square" size="small" icon={<UserOutlined />} />
<span style={{ marginLeft: 5 }}>admin</span>

View File

@ -96,7 +96,7 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => {
style={{ cursor: 'point' }}
onClick={(e) => {
e.stopPropagation();
setSearchText(`label:${label}`);
setSearchValue(`label:${label}`);
}}
>
<a>{label}</a>
@ -364,6 +364,7 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => {
const [tableScrollHeight, setTableScrollHeight] = useState<number>();
const [isDetailModalVisible, setIsDetailModalVisible] = useState(false);
const [detailCron, setDetailCron] = useState<any>();
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}
/>,
<Button key="2" type="primary" onClick={() => addCron()}>