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) => {