fix: Form collection, multiple dragging and dropping of parameters failed(#3745)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run

Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
This commit is contained in:
shaohuzhang1 2025-08-18 16:01:16 +08:00 committed by GitHub
parent 4c7cd248f8
commit 98b58e7fda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -189,7 +189,6 @@ const sync_form_field_list = () => {
]
set(props.nodeModel.properties.config, 'fields', fields)
props.nodeModel.clear_next_node_field(false)
onDragHandle()
}
const addFormCollectRef = ref<InstanceType<typeof AddFormCollect>>()
const editFormCollectRef = ref<InstanceType<typeof EditFormCollect>>()
@ -264,7 +263,7 @@ function onDragHandle() {
onEnd: (evt) => {
if (evt.oldIndex === undefined || evt.newIndex === undefined) return
//
const items = [...form_data.value.form_field_list]
const items = cloneDeep([...form_data.value.form_field_list])
const [movedItem] = items.splice(evt.oldIndex, 1)
items.splice(evt.newIndex, 0, movedItem)
form_data.value.form_field_list = items
@ -276,6 +275,7 @@ onMounted(() => {
set(props.nodeModel, 'validate', validate)
sync_form_field_list()
props.nodeModel.graphModel.eventCenter.emit('refresh_incoming_node_field')
onDragHandle()
})
</script>
<style lang="scss" scoped></style>