mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Workflow Basic Node User Input Configurable Title (#4439)
This commit is contained in:
parent
317d630cfa
commit
8fd568dd97
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue