Skip to content

Commit ee72355

Browse files
committed
feat: Support internal functionlib
--story=1017939 --user=刘瑞斌 【函数库】- 支持 系统内置函数 https://www.tapd.cn/57709429/s/1665943
1 parent 92123af commit ee72355

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)