Skip to content

Commit 0e98c77

Browse files
committed
refactor: add initialization parameters to function library update
1 parent 812dc14 commit 0e98c77

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ui/src/views/function-lib/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,14 @@ async function changeState(bool: Boolean, row: any) {
431431
row.is_active = false
432432
return
433433
}
434+
const init_params = res.data.init_field_list.reduce((acc: any, item: any) => {
435+
acc[item.field] = item.default_value
436+
return acc
437+
}, {})
434438
const obj = {
435-
is_active: bool
439+
is_active: bool,
440+
init_params: init_params,
441+
init_field_list: res.data.init_field_list
436442
}
437443
functionLibApi.putFunctionLib(row.id, obj, changeStateloading).then((res) => {})
438444
}

0 commit comments

Comments
 (0)