From 682412784b5c17c35f4399428e5a010e37cd4fc5 Mon Sep 17 00:00:00 2001 From: ZLY Date: Tue, 2 Sep 2025 13:55:47 +0800 Subject: [PATCH] =?UTF-8?q?pref(CronPicker):=20=E4=BC=98=E5=8C=96=E5=88=87?= =?UTF-8?q?=E6=8D=A2Tab=E6=97=B6=E7=9A=84=E7=8A=B6=E6=80=81=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CronPicker/index.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/CronPicker/index.tsx b/src/components/CronPicker/index.tsx index 27d6718..75fed34 100644 --- a/src/components/CronPicker/index.tsx +++ b/src/components/CronPicker/index.tsx @@ -269,12 +269,9 @@ const CronPicker: React.FC = ({ value, onChange, style, classNa // 切换Tab时更新状态 const handleTabChange = (key: string) => { setMode(key as 'visual' | 'expression'); - if (key === 'visual') { - // 切换到图形化配置时,根据当前cron表达式更新状态 - parseCronExpression(currentCron); - const newCron = generateCron(); - validateAndSet(newCron); - } + parseCronExpression(currentCron); + const newCron = generateCron(); + validateAndSet(newCron); }; const handleMinuteTypeChange = (value: string) => {