Skip to content

Commit

Permalink
fix: dropdown button wrap (#1118)
Browse files Browse the repository at this point in the history
### 简介

修复周期任务列表左下角的按钮折行

### 🔗 相关 Issue

fix [#1117](#1117)
  • Loading branch information
jin-sir authored Oct 20, 2023
1 parent d261490 commit 553653b
Showing 1 changed file with 31 additions and 32 deletions.
63 changes: 31 additions & 32 deletions taier-ui/src/pages/operation/schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

import { useState, useMemo, useContext } from 'react';
import { Tooltip, Dropdown, Menu, Modal, message, Button } from 'antd';
import { Tooltip, Dropdown, Menu, Modal, message, Button, Space } from 'antd';
import type moment from 'moment';
import { history } from 'umi';
import type { ColumnsType } from 'antd/lib/table';
Expand Down Expand Up @@ -615,37 +615,36 @@ export default () => {
return '';
},
}}
tableFooter={[
<Dropdown.Button
key="kill"
type="primary"
onClick={batchKillJobs}
overlay={
<Menu onClick={() => showKillJobsByDate(true)} style={{ width: 114 }}>
<Menu.Item key="1">按业务日期杀</Menu.Item>
</Menu>
}
trigger={['click']}
style={{ marginRight: 10 }}
icon={<DownOutlined />}
>
批量杀任务
</Dropdown.Button>,
<Dropdown.Button
key="reload"
type="primary"
onClick={reloadCurrentJob}
overlay={
<Menu onClick={() => batchReloadJobs()}>
<Menu.Item key="1">重跑当前及全部下游任务</Menu.Item>
</Menu>
}
trigger={['click']}
icon={<DownOutlined />}
>
重跑当前任务
</Dropdown.Button>,
]}
tableFooter={
<Space size={10}>
<Dropdown.Button
type="primary"
onClick={batchKillJobs}
overlay={
<Menu onClick={() => showKillJobsByDate(true)} style={{ width: 114 }}>
<Menu.Item key="1">按业务日期杀</Menu.Item>
</Menu>
}
trigger={['click']}
icon={<DownOutlined />}
>
批量杀任务
</Dropdown.Button>
<Dropdown.Button
type="primary"
onClick={reloadCurrentJob}
overlay={
<Menu onClick={() => batchReloadJobs()}>
<Menu.Item key="1">重跑当前及全部下游任务</Menu.Item>
</Menu>
}
trigger={['click']}
icon={<DownOutlined />}
>
重跑当前任务
</Dropdown.Button>
</Space>
}
/>
<SlidePane
className="m-tabs bd-top bd-right m-slide-pane"
Expand Down

0 comments on commit 553653b

Please sign in to comment.