From c44fd8a40b61ae4c473191e537787e52f156b983 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 18 Feb 2025 11:06:26 +0800 Subject: [PATCH] feat: Supports specified user input title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1017888 --user=刘瑞斌 【高级编排应用】“用户输入”可以自定义。 #2288 https://www.tapd.cn/57709429/s/1655214 --- .../ai-chat/component/user-form/index.vue | 8 +- .../component/UserInputFieldTable.vue | 39 +++++++-- .../component/UserInputTitleDialog.vue | 83 +++++++++++++++++++ 3 files changed, 123 insertions(+), 7 deletions(-) create mode 100644 ui/src/workflow/nodes/base-node/component/UserInputTitleDialog.vue diff --git a/ui/src/components/ai-chat/component/user-form/index.vue b/ui/src/components/ai-chat/component/user-form/index.vue index 6b2ac596f..2744102af 100644 --- a/ui/src/components/ai-chat/component/user-form/index.vue +++ b/ui/src/components/ai-chat/component/user-form/index.vue @@ -16,7 +16,7 @@ - {{ $t('chat.userInput') }} + {{ inputFieldConfig.title }} @@ -63,6 +63,7 @@ const props = defineProps<{ const dynamicsFormRefresh = ref(0) const inputFieldList = ref([]) const apiInputFieldList = ref([]) +const inputFieldConfig = ref({ title: t('chat.userInput') }) const showUserInput = ref(true) const emit = defineEmits(['update:api_form_data', 'update:form_data']) @@ -260,6 +261,11 @@ function handleInputFieldList() { } }) : [] + + // + inputFieldConfig.value = v.properties.user_input_config?.title + ? v.properties.user_input_config + : { title: t('chat.userInput') } }) } /** diff --git a/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue b/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue index 703c66490..1a93ac318 100644 --- a/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue +++ b/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue @@ -1,12 +1,23 @@ diff --git a/ui/src/workflow/nodes/base-node/component/UserInputTitleDialog.vue b/ui/src/workflow/nodes/base-node/component/UserInputTitleDialog.vue new file mode 100644 index 000000000..b05b0529e --- /dev/null +++ b/ui/src/workflow/nodes/base-node/component/UserInputTitleDialog.vue @@ -0,0 +1,83 @@ + + +