From 10ab6a46af767c69c290e9baf07079910e282a4e Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期一, 16 十二月 2024 17:31:44 +0800
Subject: [PATCH] 发布、调整输入框大小

---
 src/components/vue-flow/VueFlowHelper.ts |   49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 48 insertions(+), 1 deletions(-)

diff --git a/src/components/vue-flow/VueFlowHelper.ts b/src/components/vue-flow/VueFlowHelper.ts
index bda2965..842f394 100644
--- a/src/components/vue-flow/VueFlowHelper.ts
+++ b/src/components/vue-flow/VueFlowHelper.ts
@@ -87,7 +87,54 @@
 					},
 				];
 				break;
-
+			case NodeType.Code:
+				data = {
+					...data,
+					description: '鑷畾涔夐渶瑕佹墽琛岀殑浠g爜銆�',
+					[VueFlowConstant.GROUP_PARAMS_KEY]: [
+						{
+							name: '鍏ュ弬',
+							[VueFlowConstant.PARAMS_KEY]: [
+								{
+									key: 'code_input',
+									type: 'code_input',
+									required: true,
+									value: [
+										{ key: 'arg1', type: 'input', label: '', value: '' },
+										{ key: 'arg2', type: 'input', label: '', value: '' },
+									],
+								},
+							],
+						},
+						{
+							name: '鎵ц浠g爜',
+							[VueFlowConstant.PARAMS_KEY]: [
+								{
+									key: 'code',
+									type: 'code',
+									required: true,
+									value: 'const main = (arg1, arg2) =>{\n  return {\n    result1: arg1,\n    result2: arg2\n  }\n}',
+								},
+							],
+						},
+						{
+							name: '鍑哄弬',
+							[VueFlowConstant.PARAMS_KEY]: [
+								{
+									key: 'code_output',
+									type: 'code_output',
+									// global: 'code:value.map(el => ({ label: el.key, value: el.key }))',
+									required: true,
+									value: [
+										{ key: 'result1', type: 'string' },
+										{ key: 'result2', type: 'string' },
+									],
+								},
+							],
+						},
+					],
+				};
+				break;
 			case NodeType.Agent:
 				data[VueFlowConstant.GROUP_PARAMS_KEY] = [
 					{

--
Gitblit v1.9.3