diff --git a/src/pages/crontab/logModal.tsx b/src/pages/crontab/logModal.tsx index 150a0b3e..3ef6d67a 100644 --- a/src/pages/crontab/logModal.tsx +++ b/src/pages/crontab/logModal.tsx @@ -50,12 +50,12 @@ const CronLogModal = ({ setValue(log || '暂无日志'); const hasNext = log && !logEnded(log) && !log.includes('重启面板'); setExecuting(hasNext); + setTimeout(() => { + document + .querySelector('#log-flag')! + .scrollIntoView({ behavior: 'smooth' }); + }, 1000); if (hasNext) { - setTimeout(() => { - document - .querySelector('#log-flag')! - .scrollIntoView({ behavior: 'smooth' }); - }); setTimeout(() => { getCronLog(); }, 2000);