mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-12 19:30:48 +08:00
任务详情添加日志列表,更新依赖
This commit is contained in:
@@ -20,10 +20,12 @@ const CronLogModal = ({
|
||||
cron,
|
||||
handleCancel,
|
||||
visible,
|
||||
data,
|
||||
}: {
|
||||
cron?: any;
|
||||
visible: boolean;
|
||||
handleCancel: () => void;
|
||||
data?: string;
|
||||
}) => {
|
||||
const [value, setValue] = useState<string>('启动中...');
|
||||
const [loading, setLoading] = useState<any>(true);
|
||||
@@ -97,11 +99,17 @@ const CronLogModal = ({
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (cron) {
|
||||
if (cron && cron.id) {
|
||||
getCronLog(true);
|
||||
}
|
||||
}, [cron]);
|
||||
|
||||
useEffect(() => {
|
||||
if (data) {
|
||||
setValue(data);
|
||||
}
|
||||
}, [data]);
|
||||
|
||||
useEffect(() => {
|
||||
setIsPhone(document.body.clientWidth < 768);
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user