From 9afdb50cc4fda8befad8a706e05e5f8dae130b41 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 19 Aug 2024 17:00:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=AB=98=E7=BA=A7=E7=BC=96=E6=8E=92Pyt?= =?UTF-8?q?hon=E4=BB=A3=E7=A0=81=E7=BC=96=E8=BE=91=E6=A1=86=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=94=BE=E5=A4=A7=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/package.json | 3 +- ui/src/components/ai-chat/index.vue | 2 +- ui/src/components/codemirror-editor/index.vue | 32 ++++---- ui/src/styles/app.scss | 1 + ui/src/views/application-workflow/index.vue | 46 ++++++------ .../component/CopyApplicationDialog.vue | 7 +- .../component/FunctionFormDrawer.vue | 18 +++-- ui/src/workflow/nodes/function-node/index.vue | 73 ++++++++++++++++--- 8 files changed, 122 insertions(+), 60 deletions(-) diff --git a/ui/package.json b/ui/package.json index 89a31f101..0a3635c20 100644 --- a/ui/package.json +++ b/ui/package.json @@ -18,7 +18,7 @@ "@logicflow/extension": "^1.2.27", "@vueuse/core": "^10.9.0", "axios": "^0.28.0", - "codemirror-editor-vue3": "^2.7.0", + "codemirror": "^6.0.1", "cropperjs": "^1.6.2", "echarts": "^5.5.0", "element-plus": "^2.5.6", @@ -41,6 +41,7 @@ "use-element-plus-theme": "^0.0.5", "vue": "^3.3.4", "vue-clipboard3": "^2.0.0", + "vue-codemirror": "^6.1.1", "vue-i18n": "^9.13.1", "vue-router": "^4.2.4" }, diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 6a7e45a52..d72d13e79 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -125,7 +125,7 @@ - + - + diff --git a/ui/src/styles/app.scss b/ui/src/styles/app.scss index 92dd6ce8b..f751a73b3 100644 --- a/ui/src/styles/app.scss +++ b/ui/src/styles/app.scss @@ -710,3 +710,4 @@ h5 { .custom-header { background: var(--el-color-primary-light-9) !important; } + diff --git a/ui/src/views/application-workflow/index.vue b/ui/src/views/application-workflow/index.vue index d4a4fd617..c09fae83d 100644 --- a/ui/src/views/application-workflow/index.vue +++ b/ui/src/views/application-workflow/index.vue @@ -47,27 +47,11 @@ -
- -
-
{{ functionNode.label }}
- {{ functionNode.text }} -
-
- - + + +
diff --git a/ui/src/views/application/component/CopyApplicationDialog.vue b/ui/src/views/application/component/CopyApplicationDialog.vue index fc9dc58d2..93216f55f 100644 --- a/ui/src/views/application/component/CopyApplicationDialog.vue +++ b/ui/src/views/application/component/CopyApplicationDialog.vue @@ -45,19 +45,18 @@ - + diff --git a/ui/src/workflow/nodes/function-node/index.vue b/ui/src/workflow/nodes/function-node/index.vue index 51ed65be6..865c8970b 100644 --- a/ui/src/workflow/nodes/function-node/index.vue +++ b/ui/src/workflow/nodes/function-node/index.vue @@ -58,6 +58,7 @@ class="w-full" placeholder="请选择变量" v-model="item.value" + :width="100" /> @@ -68,15 +69,21 @@
Python 代码
- +
+ + +
+ - +