From 41ad2eeef23c4b9d2fd95fb64630d4063af4e14e Mon Sep 17 00:00:00 2001 From: CaptainB Date: Sat, 12 Jul 2025 10:47:32 +0800 Subject: [PATCH] fix: ensure ttsModelChange executes after DOM updates using nextTick MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1058556 --user=刘瑞斌 【应用】基本信息节点开启语音播放,调试模式下切换模型,点击保存提问后使用语音播放失败 https://www.tapd.cn/62980211/s/1729683 --- ui/src/workflow/nodes/base-node/index.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ui/src/workflow/nodes/base-node/index.vue b/ui/src/workflow/nodes/base-node/index.vue index 336b9bef0..34c83af20 100644 --- a/ui/src/workflow/nodes/base-node/index.vue +++ b/ui/src/workflow/nodes/base-node/index.vue @@ -170,7 +170,7 @@ import { groupBy, set } from 'lodash' import NodeContainer from '@/workflow/common/NodeContainer.vue' import type { FormInstance } from 'element-plus' -import { ref, computed, onMounted } from 'vue' +import { ref, computed, onMounted, nextTick } from 'vue' import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message' import { t } from '@/locales' import TTSModeParamSettingDialog from '@/views/application/component/TTSModeParamSettingDialog.vue' @@ -265,11 +265,13 @@ function getTTSModel() { } function ttsModelChange() { - if (form_data.value.tts_model_id) { - TTSModeParamSettingDialogRef.value?.reset_default(form_data.value.tts_model_id, id) - } else { - refreshTTSForm({}) - } + nextTick(() => { + if (form_data.value.tts_model_id) { + TTSModeParamSettingDialogRef.value?.reset_default(form_data.value.tts_model_id, id) + } else { + refreshTTSForm({}) + } + }) } function ttsModelEnableChange() {