Skip to content

Commit 41ad2ee

Browse files
committed
fix: ensure ttsModelChange executes after DOM updates using nextTick
--bug=1058556 --user=刘瑞斌 【应用】基本信息节点开启语音播放,调试模式下切换模型,点击保存提问后使用语音播放失败 https://www.tapd.cn/62980211/s/1729683
1 parent 2d734d0 commit 41ad2ee

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ui/src/workflow/nodes/base-node/index.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
import { groupBy, set } from 'lodash'
171171
import NodeContainer from '@/workflow/common/NodeContainer.vue'
172172
import type { FormInstance } from 'element-plus'
173-
import { ref, computed, onMounted } from 'vue'
173+
import { ref, computed, onMounted, nextTick } from 'vue'
174174
import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message'
175175
import { t } from '@/locales'
176176
import TTSModeParamSettingDialog from '@/views/application/component/TTSModeParamSettingDialog.vue'
@@ -265,11 +265,13 @@ function getTTSModel() {
265265
}
266266
267267
function ttsModelChange() {
268-
if (form_data.value.tts_model_id) {
269-
TTSModeParamSettingDialogRef.value?.reset_default(form_data.value.tts_model_id, id)
270-
} else {
271-
refreshTTSForm({})
272-
}
268+
nextTick(() => {
269+
if (form_data.value.tts_model_id) {
270+
TTSModeParamSettingDialogRef.value?.reset_default(form_data.value.tts_model_id, id)
271+
} else {
272+
refreshTTSForm({})
273+
}
274+
})
273275
}
274276
275277
function ttsModelEnableChange() {

0 commit comments

Comments
 (0)