Skip to content

Commit 8a7e41b

Browse files
committed
fix: enhance init_params check to ensure default values are present in init_field_list
--bug=1054001 --user=刘瑞斌 【函数库】创建时设置了默认启动参数,但依然弹出启动参数弹窗 https://www.tapd.cn/57709429/s/1677100
1 parent 532ea49 commit 8a7e41b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ async function changeState(bool: Boolean, row: any) {
404404
})
405405
} else {
406406
const res = await functionLibApi.getFunctionLibById(row.id, changeStateloading)
407-
if (!res.data.init_params && res.data.init_field_list && res.data.init_field_list.length > 0) {
407+
if (!res.data.init_params &&
408+
res.data.init_field_list &&
409+
res.data.init_field_list.length > 0 &&
410+
res.data.init_field_list.filter((item: any) => item.default_value).length !== res.data.init_field_list.length
411+
) {
408412
InitParamDrawerRef.value.open(res.data, bool)
409413
row.is_active = false
410414
return

0 commit comments

Comments
 (0)