修复cron日志显示

This commit is contained in:
whyour
2021-04-10 19:50:52 +08:00
parent f9c299cfbe
commit 9a1891c909
3 changed files with 36 additions and 10 deletions
+7 -2
View File
@@ -120,8 +120,7 @@ const Crontab = () => {
<Tooltip title="日志">
<a
onClick={() => {
setLogCron(record);
setIsLogModalVisible(true);
setLogCron({ ...record, timestamp: Date.now() });
}}
>
<FileTextOutlined />
@@ -386,6 +385,12 @@ const Crontab = () => {
.finally(() => setLoading(false));
};
useEffect(() => {
if (logCron) {
setIsLogModalVisible(true);
}
}, [logCron]);
useEffect(() => {
getCrons();
}, [searchText]);