fix: Workflow Basic Node User Input Configurable Title (#4439)

This commit is contained in:
shaohuzhang1 2025-12-04 18:58:32 +08:00 committed by GitHub
parent 317d630cfa
commit 8fd568dd97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -10,7 +10,7 @@
>
<template #default>
<h4 class="title-decoration-1 mb-16 mt-4">
{{ $t('chat.userInput') }}
{{ chat_title || $t('chat.userInput') }}
</h4>
</template>
</DynamicsForm>
@ -26,6 +26,10 @@ const dynamicsFormRef = ref<InstanceType<typeof DynamicsForm>>()
const validate = () => {
return dynamicsFormRef.value?.validate()
}
const chat_title = computed(() => {
const kBase = props.workflow?.nodes?.find((n: any) => n.type === WorkflowType.KnowledgeBase)
return kBase.properties.user_input_config.title
})
const base_form_list = computed(() => {
const kBase = props.workflow?.nodes?.find((n: any) => n.type === WorkflowType.KnowledgeBase)
if (kBase) {

View File

@ -209,7 +209,10 @@ onMounted(() => {
if (props.nodeModel.properties.user_input_field_list) {
inputFieldList.value = cloneDeep(props.nodeModel.properties.user_input_field_list)
}
if (props.nodeModel.properties.user_input_config) {
inputFieldConfig.value = props.nodeModel.properties.user_input_config
}
set(props.nodeModel.properties, 'user_input_config', inputFieldConfig)
onDragHandle()
})
</script>