Skip to content

Commit

Permalink
fix: model params
Browse files Browse the repository at this point in the history
  • Loading branch information
wxg0103 committed Dec 25, 2024
1 parent f43d700 commit 9e1b7fc
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9e1b7fc

Please sign in to comment.