mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-28 14:52:58 +00:00
fix: model params
This commit is contained in:
parent
f43d700fd8
commit
9e1b7fc3ab
|
|
@ -65,7 +65,13 @@ const reset_default = (model_id: string, application_id?: string) => {
|
|||
api.then((ok) => {
|
||||
model_form_field.value = ok.data
|
||||
const model_setting_data = ok.data
|
||||
.map((item) => ({ [item.field]: item.default_value }))
|
||||
.map((item) => {
|
||||
if (item.show_default_value === false) {
|
||||
return { [item.field]: undefined }
|
||||
} else {
|
||||
return { [item.field]: item.default_value }
|
||||
}
|
||||
})
|
||||
.reduce((x, y) => ({ ...x, ...y }), {})
|
||||
|
||||
emit('refresh', model_setting_data)
|
||||
|
|
|
|||
Loading…
Reference in New Issue