mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复定时任务日志滚动
This commit is contained in:
parent
5907553670
commit
e7be4999b0
|
@ -39,8 +39,16 @@ body {
|
||||||
.ant-modal-body {
|
.ant-modal-body {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
min-height: 300px;
|
min-height: 300px;
|
||||||
max-height: 80vh;
|
max-height: calc(80vh - 110px);
|
||||||
max-height: calc(80vh - var(--vh-offset, 0px));
|
max-height: calc(80vh - var(--vh-offset, 110px));
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.log-container {
|
||||||
|
width: 100%;
|
||||||
|
padding: 24px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
|
|
@ -50,8 +50,8 @@ const CronLogModal = ({
|
||||||
log && !logEnded(log) && !log.includes('任务未运行'),
|
log && !logEnded(log) && !log.includes('任务未运行'),
|
||||||
);
|
);
|
||||||
setExecuting(hasNext);
|
setExecuting(hasNext);
|
||||||
autoScroll();
|
|
||||||
if (hasNext) {
|
if (hasNext) {
|
||||||
|
autoScroll();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getCronLog();
|
getCronLog();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
@ -74,7 +74,7 @@ const CronLogModal = ({
|
||||||
document
|
document
|
||||||
.querySelector('#log-flag')!
|
.querySelector('#log-flag')!
|
||||||
.scrollIntoView({ behavior: 'smooth' });
|
.scrollIntoView({ behavior: 'smooth' });
|
||||||
}, 1000);
|
}, 600);
|
||||||
};
|
};
|
||||||
|
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
|
|
|
@ -130,22 +130,24 @@ const DependenceLogModal = ({
|
||||||
</Button>,
|
</Button>,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{loading ? (
|
<div className="log-container">
|
||||||
<PageLoading />
|
{loading ? (
|
||||||
) : (
|
<PageLoading />
|
||||||
<pre
|
) : (
|
||||||
style={
|
<pre
|
||||||
isPhone
|
style={
|
||||||
? {
|
isPhone
|
||||||
fontFamily: 'Source Code Pro',
|
? {
|
||||||
zoom: 0.83,
|
fontFamily: 'Source Code Pro',
|
||||||
}
|
zoom: 0.83,
|
||||||
: {}
|
}
|
||||||
}
|
: {}
|
||||||
>
|
}
|
||||||
<Ansi>{value}</Ansi>
|
>
|
||||||
</pre>
|
<Ansi>{value}</Ansi>
|
||||||
)}
|
</pre>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -108,22 +108,24 @@ const SubscriptionLogModal = ({
|
||||||
</Button>,
|
</Button>,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{loading ? (
|
<div className="log-container">
|
||||||
<PageLoading />
|
{loading ? (
|
||||||
) : (
|
<PageLoading />
|
||||||
<pre
|
) : (
|
||||||
style={
|
<pre
|
||||||
isPhone
|
style={
|
||||||
? {
|
isPhone
|
||||||
fontFamily: 'Source Code Pro',
|
? {
|
||||||
zoom: 0.83,
|
fontFamily: 'Source Code Pro',
|
||||||
}
|
zoom: 0.83,
|
||||||
: {}
|
}
|
||||||
}
|
: {}
|
||||||
>
|
}
|
||||||
{value}
|
>
|
||||||
</pre>
|
{value}
|
||||||
)}
|
</pre>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user