Skip to content

Commit a5779a0

Browse files
committed
fix: 修复表单收集删除表单配置后,参数输出没有及时更新
1 parent ec27e1e commit a5779a0

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

ui/src/workflow/nodes/form-node/index.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,16 @@ import { type FormInstance } from 'element-plus'
113113
import { ref, onMounted, computed } from 'vue'
114114
import { input_type_list } from '@/components/dynamics-form/constructor/data'
115115
import { MsgError } from '@/utils/message'
116-
import { set,cloneDeep } from 'lodash'
116+
import { set, cloneDeep } from 'lodash'
117117
const props = defineProps<{ nodeModel: any }>()
118118
const formNodeFormRef = ref<FormInstance>()
119119
const editFormField = (form_field_data: any, field_index: number) => {
120-
const _value=form_data.value.form_field_list.map(
121-
(item: any, index: number) => {
122-
if (field_index === index) {
123-
return cloneDeep(form_field_data)
124-
}
125-
return cloneDeep(item)
120+
const _value = form_data.value.form_field_list.map((item: any, index: number) => {
121+
if (field_index === index) {
122+
return cloneDeep(form_field_data)
126123
}
127-
)
124+
return cloneDeep(item)
125+
})
128126
form_data.value.form_field_list = _value
129127
sync_form_field_list()
130128
}
@@ -161,6 +159,7 @@ const deleteField = (form_field_data: any) => {
161159
form_data.value.form_field_list = form_data.value.form_field_list.filter(
162160
(field: any) => field.field !== form_field_data.field
163161
)
162+
sync_form_field_list()
164163
}
165164
const form = ref<any>({
166165
is_result: true,

0 commit comments

Comments
 (0)