From 05d43f38cead084f61ed6a6468716579bc6550f2 Mon Sep 17 00:00:00 2001 From: "Yoan.liu" Date: Mon, 19 May 2025 18:15:04 +0800 Subject: [PATCH] improve previous variables --- .../workflow/node/ConditionNodeConfigForm.tsx | 21 +++++++++++------ ui/src/domain/workflow.ts | 23 +++++++++++++++++++ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/ui/src/components/workflow/node/ConditionNodeConfigForm.tsx b/ui/src/components/workflow/node/ConditionNodeConfigForm.tsx index 4eca1617..c83a4b68 100644 --- a/ui/src/components/workflow/node/ConditionNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/ConditionNodeConfigForm.tsx @@ -183,13 +183,20 @@ const ConditionNodeConfigForm = forwardRef {/* 左侧变量选择器 */} - + {/* 操作符 */} diff --git a/ui/src/domain/workflow.ts b/ui/src/domain/workflow.ts index 762d57ab..6cccf32e 100644 --- a/ui/src/domain/workflow.ts +++ b/ui/src/domain/workflow.ts @@ -187,6 +187,29 @@ export type WorkflowNodeIOValueSelector = { name: string; }; +export const workflowNodeIOOptions = (node: WorkflowNode, io: WorkflowNodeIO) => { + switch (io.type) { + case "certificate": + return [ + { + label: "是否有效", + value: "valid", + }, + { + label: "剩余有效天数", + value: "valid", + }, + ]; + default: + return [ + { + label: `${node.name} - ${io.label}`, + value: `${node.id}#${io.name}`, + }, + ]; + } +}; + // #endregion // #region Condition expression