mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复任务详情交互样式
This commit is contained in:
parent
bc7f406968
commit
9ee08acf29
|
@ -67,6 +67,7 @@ const CronDetailModal = ({
|
|||
const editorRef = useRef<any>(null);
|
||||
const [scriptInfo, setScriptInfo] = useState<any>({});
|
||||
const [logUrl, setLogUrl] = useState('');
|
||||
const [validTabs, setValidTabs] = useState(tabList);
|
||||
|
||||
const contentList: any = {
|
||||
log: (
|
||||
|
@ -146,6 +147,8 @@ const CronDetailModal = ({
|
|||
.then((data) => {
|
||||
setValue(data.data);
|
||||
});
|
||||
} else {
|
||||
setValidTabs([validTabs[0]]);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -204,7 +207,9 @@ const CronDetailModal = ({
|
|||
title={
|
||||
<>
|
||||
<span>{cron.name}</span>
|
||||
<Divider type="vertical"></Divider>
|
||||
{cron.labels?.length > 0 && cron.labels[0] !== '' && (
|
||||
<Divider type="vertical"></Divider>
|
||||
)}
|
||||
{cron.labels?.length > 0 &&
|
||||
cron.labels[0] !== '' &&
|
||||
cron.labels?.map((label: string, i: number) => (
|
||||
|
@ -222,7 +227,7 @@ const CronDetailModal = ({
|
|||
wrapClassName="crontab-detail"
|
||||
width={!isPhone ? '80vw' : ''}
|
||||
>
|
||||
<div style={{ height: '80vh' }}>
|
||||
<div className="card-wrapper">
|
||||
<Card>
|
||||
<div className="cron-detail-info-item">
|
||||
<div className="cron-detail-info-title">任务</div>
|
||||
|
@ -298,7 +303,7 @@ const CronDetailModal = ({
|
|||
</Card>
|
||||
<Card
|
||||
style={{ marginTop: 10 }}
|
||||
tabList={tabList}
|
||||
tabList={validTabs}
|
||||
activeTabKey={activeTabKey}
|
||||
onTabChange={(key) => {
|
||||
onTabChange(key);
|
||||
|
@ -314,7 +319,6 @@ const CronDetailModal = ({
|
|||
</Button>
|
||||
)
|
||||
}
|
||||
bodyStyle={{ height: 'calc(80vh - 238px)', overflowY: 'auto' }}
|
||||
>
|
||||
{contentList[activeTabKey]}
|
||||
</Card>
|
||||
|
|
|
@ -9,6 +9,19 @@
|
|||
}
|
||||
|
||||
.crontab-detail {
|
||||
.card-wrapper {
|
||||
height: 80vh;
|
||||
height: calc(80vh - var(--vh-offset, 0px));
|
||||
|
||||
.ant-card:last-child {
|
||||
.ant-card-body {
|
||||
height: calc(80vh - 238px);
|
||||
height: calc(80vh - var(--vh-offset, 0px) - 238px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
background: #eee;
|
||||
padding: 12px;
|
||||
|
|
Loading…
Reference in New Issue
Block a user