diff --git a/easyflow-ui-admin/app/src/views/ai/workflow/customNode/searchDatacenter.ts b/easyflow-ui-admin/app/src/views/ai/workflow/customNode/searchDatacenter.ts index 9422777..13cb551 100644 --- a/easyflow-ui-admin/app/src/views/ai/workflow/customNode/searchDatacenter.ts +++ b/easyflow-ui-admin/app/src/views/ai/workflow/customNode/searchDatacenter.ts @@ -47,6 +47,7 @@ export const SearchDatacenterNode = async () => { }, { type: 'textarea', + templateSupport: true, label: "如:name='张三' and age=21 or field = {{流程变量}}", description: '', name: 'where', diff --git a/easyflow-ui-admin/app/src/views/ai/workflow/customNode/sqlNode.ts b/easyflow-ui-admin/app/src/views/ai/workflow/customNode/sqlNode.ts index 7806bd6..cb3e406 100644 --- a/easyflow-ui-admin/app/src/views/ai/workflow/customNode/sqlNode.ts +++ b/easyflow-ui-admin/app/src/views/ai/workflow/customNode/sqlNode.ts @@ -16,6 +16,7 @@ export default { { name: 'sql', type: 'textarea', + templateSupport: true, label: 'SQL', placeholder: $t('aiWorkflow.descriptions.enterSQL'), }, diff --git a/easyflow-ui-admin/packages/tinyflow-ui/src/components/core/ParamTokenEditor.svelte b/easyflow-ui-admin/packages/tinyflow-ui/src/components/core/ParamTokenEditor.svelte new file mode 100644 index 0000000..87c4cb2 --- /dev/null +++ b/easyflow-ui-admin/packages/tinyflow-ui/src/components/core/ParamTokenEditor.svelte @@ -0,0 +1,748 @@ + + +
+ {#if showInlineHint} +
+ {#if unresolvedTokensInEditor.length > 0} +
+ + + 未映射参数:{unresolvedTokensInEditor.join('、')} + +
+ {/if} + {#if undefinedTokensInEditor.length > 0} +
+ + + 未定义参数:{undefinedTokensInEditor.join('、')} + +
+ {/if} +
+ {/if} + +
+ + + {#if mode === 'input'} + + {:else} + + {/if} + +
+ + + {#snippet floating()} +
+ {#if hasParams} + {#each paramCandidates as candidate} + + {/each} + {:else} +
请先在输入参数中定义参数
+ {/if} +
+ {/snippet} +
+
+
+
+ + diff --git a/easyflow-ui-admin/packages/tinyflow-ui/src/components/core/RefParameterItem.svelte b/easyflow-ui-admin/packages/tinyflow-ui/src/components/core/RefParameterItem.svelte index 37f671e..266ff40 100644 --- a/easyflow-ui-admin/packages/tinyflow-ui/src/components/core/RefParameterItem.svelte +++ b/easyflow-ui-admin/packages/tinyflow-ui/src/components/core/RefParameterItem.svelte @@ -42,7 +42,7 @@ [key]: value }; return { - [dataKeyName]: parameters + [dataKeyName]: [...parameters] }; }); }; @@ -172,4 +172,3 @@ - diff --git a/easyflow-ui-admin/packages/tinyflow-ui/src/components/nodes/CodeNode.svelte b/easyflow-ui-admin/packages/tinyflow-ui/src/components/nodes/CodeNode.svelte index db357c8..5e50b10 100644 --- a/easyflow-ui-admin/packages/tinyflow-ui/src/components/nodes/CodeNode.svelte +++ b/easyflow-ui-admin/packages/tinyflow-ui/src/components/nodes/CodeNode.svelte @@ -1,14 +1,14 @@ @@ -89,9 +103,10 @@ - URL 地址 -
-
+
+
请求配置
+
+
{ +
+
+ { updateNodeData(currentNodeId, ()=>{ return { url: e.target.value } }) - }} value={data.url as string||""} /> + }} + /> +
-
- Http 头信息 - + + + + +
+
- - {#if data.method === 'post' || data.method === 'put' || data.method === 'delete' || data.method === 'patch'} - - Body -
- - - - - + {#if showBodyConfig} +
+
Body 类型
+
+ {#each bodyTypeOptions as option} + + {/each} +
{/if} {#if data.bodyType === 'form-data'} -
+
+
参数 +
+
- {/if} {#if data.bodyType === 'x-www-form-urlencoded'} -
+
+
Body 参数 +
+
- {/if} {#if data.bodyType === 'json'} -
-