diff --git a/packages/plugins/workflow/src/client/locale/zh-CN.ts b/packages/plugins/workflow/src/client/locale/zh-CN.ts index 91cbd5591..d9a47e00a 100644 --- a/packages/plugins/workflow/src/client/locale/zh-CN.ts +++ b/packages/plugins/workflow/src/client/locale/zh-CN.ts @@ -32,6 +32,7 @@ export default { 'Based on date field of collection': '根据数据表时间字段', 'Starts on': '开始于', 'Ends on': '结束于', + 'No end': '不结束', 'Exactly at': '当时', 'Repeat mode': '重复模式', 'Repeat limit': '重复次数', diff --git a/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx b/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx index f0e60ca6b..9b41bf2a1 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx +++ b/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx @@ -10,23 +10,28 @@ import { OnField } from "./OnField"; export function EndsByField({ value, onChange }) { const { t } = useWorkflowTranslation(); - const [type, setType] = useState(typeof value === 'object' && !(value instanceof Date) ? 'field' : 'date'); - + const type = value != null ? typeof value === 'object' && !(value instanceof Date) ? 'field' : 'date' : null; return (
);