fix: 修复配置TTS参数不保存点取消后不能回显的问题
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled

--bug=1048094 --user=刘瑞斌 【应用编排】进入编排页面,在语音模型参数设置弹框中点击取消后再次打开弹框,自定义字段值全部清空了 https://www.tapd.cn/57709429/s/1598751
This commit is contained in:
CaptainB 2024-10-25 19:28:34 +08:00
parent dbaafee224
commit 71cc563d08

View File

@ -75,12 +75,10 @@ const open = (model_id: string, application_id?: string, model_setting_data?: an
const api = getApi(model_id, application_id)
api.then((ok) => {
model_form_field.value = ok.data
model_setting_data =
model_setting_data && keys(model_setting_data).length > 0
? model_setting_data
: ok.data
const resp = ok.data
.map((item: any) => ({ [item.field]: item.default_value }))
.reduce((x, y) => ({ ...x, ...y }), {})
model_setting_data = { ...resp, ...model_setting_data }
//
dynamicsFormRef.value?.render(model_form_field.value, model_setting_data)
})