mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-29 07:52:50 +00:00
fix: 及时更新流程图里的变量
This commit is contained in:
parent
61cf6a8fdd
commit
3499332b74
|
|
@ -412,6 +412,7 @@ function openAddDialog(data?: any, index?: any) {
|
|||
|
||||
function deleteField(index: any) {
|
||||
inputFieldList.value.splice(index, 1)
|
||||
props.nodeModel.graphModel.eventCenter.emit('refreshFieldList', inputFieldList.value)
|
||||
}
|
||||
|
||||
function refreshFieldList(data: any) {
|
||||
|
|
@ -428,6 +429,7 @@ function refreshFieldList(data: any) {
|
|||
}
|
||||
currentIndex.value = null
|
||||
FieldFormDialogRef.value.close()
|
||||
props.nodeModel.graphModel.eventCenter.emit('refreshFieldList', inputFieldList.value)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ const showicon = ref(false)
|
|||
|
||||
const inputFieldList = ref<any[]>([])
|
||||
|
||||
onMounted(() => {
|
||||
function handleRefreshFieldList(data: any[]) {
|
||||
props.nodeModel.graphModel.nodes
|
||||
.filter((v: any) => v.id === 'base-node')
|
||||
.map((v: any) => {
|
||||
|
|
@ -56,6 +56,14 @@ onMounted(() => {
|
|||
]
|
||||
inputFieldList.value = v.properties.input_field_list
|
||||
})
|
||||
}
|
||||
|
||||
props.nodeModel.graphModel.eventCenter.on('refreshFieldList', (data: any) => {
|
||||
handleRefreshFieldList(data)
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
handleRefreshFieldList([])
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue