diff --git a/ui/src/components/codemirror-editor/index.vue b/ui/src/components/codemirror-editor/index.vue
index c4086b872..0d9d81cac 100644
--- a/ui/src/components/codemirror-editor/index.vue
+++ b/ui/src/components/codemirror-editor/index.vue
@@ -1,16 +1,50 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/ui/src/views/function-lib/component/FunctionFormDrawer.vue b/ui/src/views/function-lib/component/FunctionFormDrawer.vue
index 2b74e052b..2b8031e8c 100644
--- a/ui/src/views/function-lib/component/FunctionFormDrawer.vue
+++ b/ui/src/views/function-lib/component/FunctionFormDrawer.vue
@@ -133,13 +133,8 @@
-
-
-
+
+
{{ $t('common.param.outputParam') }}
@@ -162,27 +157,6 @@
-
-
-
-
-
-
-
@@ -223,9 +197,6 @@ const form = ref({
permission_type: 'PRIVATE'
})
-const dialogVisible = ref(false)
-const cloneContent = ref('')
-
watch(visible, (bool) => {
if (!bool) {
isEdit.value = false
@@ -259,14 +230,8 @@ const rules = reactive({
]
})
-function openCodemirrorDialog() {
- cloneContent.value = form.value.code
- dialogVisible.value = true
-}
-
-function submitDialog() {
- form.value.code = cloneContent.value
- dialogVisible.value = false
+function submitCodemirrorEditor(val: string) {
+ form.value.code = val
}
function close() {
@@ -353,13 +318,4 @@ defineExpose({
open
})
-
+
diff --git a/ui/src/workflow/icons/variable-assign-node-icon.vue b/ui/src/workflow/icons/variable-assign-node-icon.vue
index d83f578d1..a7b580ff3 100644
--- a/ui/src/workflow/icons/variable-assign-node-icon.vue
+++ b/ui/src/workflow/icons/variable-assign-node-icon.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/ui/src/workflow/nodes/function-node/index.vue b/ui/src/workflow/nodes/function-node/index.vue
index abd5c31fa..0bbd5158a 100644
--- a/ui/src/workflow/nodes/function-node/index.vue
+++ b/ui/src/workflow/nodes/function-node/index.vue
@@ -23,7 +23,8 @@
:prop="'input_field_list.' + index + '.value'"
:rules="{
required: item.is_required,
- message: item.source === 'reference'
+ message:
+ item.source === 'reference'
? $t('views.functionLib.functionForm.form.param.selectPlaceholder')
: $t('views.functionLib.functionForm.form.param.inputPlaceholder'),
trigger: 'blur'
@@ -76,17 +77,13 @@
{{ $t('views.functionLib.functionForm.form.param.code') }}
-
+
-
-
-
-
-
-
-
-
-
+
diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue
index ecd8fd31b..a88bccec9 100644
--- a/ui/src/workflow/nodes/variable-assign-node/index.vue
+++ b/ui/src/workflow/nodes/variable-assign-node/index.vue
@@ -7,6 +7,7 @@
require-asterisk-position="right"
label-width="auto"
ref="replyNodeFormRef"
+ hide-required-asterisk
>
@@ -17,7 +18,11 @@
{{ $t('views.applicationWorkflow.variable.label') }}
*
-
+
@@ -34,116 +39,102 @@
@change="variableChange(item)"
/>
-
-
-
-
- {{ $t('views.applicationWorkflow.nodes.variableAssignNode.assign')
- }}*
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ {{ $t('views.applicationWorkflow.nodes.variableAssignNode.assign')
+ }}*
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ v-else-if="item.type === 'json'"
+ :prop="'variable_list.' + index + '.value'"
+ :rules="[
+ {
+ message: $t('common.inputPlaceholder'),
+ trigger: 'blur',
+ required: true
+ },
+ {
+ validator: (rule: any, value: any, callback: any) => {
+ try {
+ JSON.parse(value)
+ callback() // Valid JSON
+ } catch (e) {
+ callback(new Error('Invalid JSON format'))
+ }
+ },
+ trigger: 'blur'
+ }
+ ]"
+ >
+ (form_data.variable_list[index].value = val)"
+ />
+
+
+
+
@@ -212,6 +203,7 @@ function submitDialog(val: string) {
const replyNodeFormRef = ref()
const nodeCascaderRef = ref()
const nodeCascaderRef2 = ref()
+
const validate = async () => {
// console.log(replyNodeFormRef.value.validate())
let ps = [