From 46c37257bccbac590884fb0152f4a06b5b4bc04c Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Sun, 1 Dec 2024 00:05:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8D=95=E9=80=89?= =?UTF-8?q?=E6=A1=86=E5=A4=9A=E9=80=89=E6=A1=86=20=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E6=9C=AA=E4=BD=BF=E7=94=A8label=E4=BD=9C=E4=B8=BA?= =?UTF-8?q?=E9=80=89=E9=A1=B9=20(#1719)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constructor/items/JsonInputConstructor.vue | 1 - .../constructor/items/MultiSelectConstructor.vue | 6 +++--- .../constructor/items/SingleSelectConstructor.vue | 6 +++--- ui/src/workflow/nodes/form-node/index.vue | 9 +++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ui/src/components/dynamics-form/constructor/items/JsonInputConstructor.vue b/ui/src/components/dynamics-form/constructor/items/JsonInputConstructor.vue index 10eb95613..5121bd020 100644 --- a/ui/src/components/dynamics-form/constructor/items/JsonInputConstructor.vue +++ b/ui/src/components/dynamics-form/constructor/items/JsonInputConstructor.vue @@ -14,7 +14,6 @@ import JsonInput from '@/components/dynamics-form/items/JsonInput.vue' const props = defineProps<{ modelValue: any }>() -const formField = ref({}) const emit = defineEmits(['update:modelValue']) const formValue = computed({ set: (item) => { diff --git a/ui/src/components/dynamics-form/constructor/items/MultiSelectConstructor.vue b/ui/src/components/dynamics-form/constructor/items/MultiSelectConstructor.vue index 6b94a3a5a..4a5fa18ef 100644 --- a/ui/src/components/dynamics-form/constructor/items/MultiSelectConstructor.vue +++ b/ui/src/components/dynamics-form/constructor/items/MultiSelectConstructor.vue @@ -63,7 +63,7 @@ @@ -102,8 +102,8 @@ const getData = () => { input_type: 'MultiSelect', attrs: {}, default_value: formValue.value.default_value, - textField: 'label', - valueField: 'value', + text_field: 'label', + value_field: 'value', option_list: formValue.value.option_list } } diff --git a/ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue b/ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue index 46a79572f..67b69a0d1 100644 --- a/ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue +++ b/ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue @@ -55,7 +55,7 @@ @@ -94,8 +94,8 @@ const getData = () => { input_type: 'SingleSelect', attrs: {}, default_value: formValue.value.default_value, - textField: 'label', - valueField: 'value', + text_field: 'label', + value_field: 'value', option_list: formValue.value.option_list } } diff --git a/ui/src/workflow/nodes/form-node/index.vue b/ui/src/workflow/nodes/form-node/index.vue index 6a9e78969..3f5badd28 100644 --- a/ui/src/workflow/nodes/form-node/index.vue +++ b/ui/src/workflow/nodes/form-node/index.vue @@ -113,18 +113,19 @@ import { type FormInstance } from 'element-plus' import { ref, onMounted, computed } from 'vue' import { input_type_list } from '@/components/dynamics-form/constructor/data' import { MsgError } from '@/utils/message' -import { set } from 'lodash' +import { set,cloneDeep } from 'lodash' const props = defineProps<{ nodeModel: any }>() const formNodeFormRef = ref() const editFormField = (form_field_data: any, field_index: number) => { - form_data.value.form_field_list = form_data.value.form_field_list.map( + const _value=form_data.value.form_field_list.map( (item: any, index: number) => { if (field_index === index) { - return form_field_data + return cloneDeep(form_field_data) } - return item + return cloneDeep(item) } ) + form_data.value.form_field_list = _value sync_form_field_list() } const addFormField = (form_field_data: any) => {