File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
ui/src/views/function-lib Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ function searchHandle() {
371371 getList ()
372372}
373373
374- function changeState(bool : Boolean , row : any ) {
374+ async function changeState(bool : Boolean , row : any ) {
375375 if (! bool ) {
376376 MsgConfirm (
377377 ` ${t (' views.functionLib.disabled.confirmTitle' )}${row .name } ? ` ,
@@ -391,14 +391,11 @@ function changeState(bool: Boolean, row: any) {
391391 row .is_active = true
392392 })
393393 } else {
394- for (let i = 0 ; i < row .init_field_list .length ; i ++ ) {
395- if (! row .init_field_list [i ].value ) {
396- functionLibApi .getFunctionLibById (row .id ).then ((res ) => {
397- InitParamDrawerRef .value .open (res .data )
398- row .is_active = false
399- })
400- return
401- }
394+ const res = await functionLibApi .getFunctionLibById (row .id )
395+ if (! res .data .init_params ) {
396+ InitParamDrawerRef .value .open (res .data )
397+ row .is_active = false
398+ return
402399 }
403400 const obj = {
404401 is_active: bool
You can’t perform that action at this time.
0 commit comments