From 0198ebbbff2c9e15a8ef5d22c0a8b865c43477af Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 3 Sep 2022 15:16:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1=E8=A7=86?= =?UTF-8?q?=E5=9B=BEtab=E6=BF=80=E6=B4=BB=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/crontab/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index 36d08343..b283b387 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -838,11 +838,14 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => { if (pageConf.page && pageConf.size) { getCrons(); } - if (viewConf) { + }, [pageConf, viewConf]); + + useEffect(() => { + if (viewConf && enabledCronViews && enabledCronViews.length > 0) { const view = enabledCronViews.slice(2).find((x) => x.id === viewConf.id); setMoreMenuActive(!!view); } - }, [pageConf, viewConf]); + }, [viewConf, enabledCronViews]); useEffect(() => { setPageConf({