Skip to content

Commit 286552d

Browse files
committed
fix: update InitParamDrawer to handle is_active state in open method
--bug=1053998 --user=刘瑞斌 【函数库】首次开启函数并设置启动参数失败 https://www.tapd.cn/57709429/s/1677086
1 parent f82ba3c commit 286552d

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

ui/src/views/function-lib/component/InitParamDrawer.vue

+4-8
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,16 @@ const emit = defineEmits(['refresh'])
4848
const dynamicsFormRef = ref()
4949
const loading = ref(false)
5050
const debugVisible = ref(false)
51-
const showResult = ref(false)
52-
const isSuccess = ref(false)
53-
const result = ref('')
5451
5552
const form = ref<any>({
5653
init_params: {}
5754
})
5855
5956
watch(debugVisible, (bool) => {
6057
if (!bool) {
61-
showResult.value = false
62-
isSuccess.value = false
63-
result.value = ''
6458
form.value = {
65-
init_params: {}
59+
init_params: {},
60+
is_active: false
6661
}
6762
}
6863
})
@@ -78,9 +73,10 @@ const submit = async () => {
7873
})
7974
}
8075
81-
const open = (data: any) => {
76+
const open = (data: any, is_active: boolean) => {
8277
if (data) {
8378
form.value = cloneDeep(data)
79+
form.value.is_active = is_active
8480
}
8581
const init_params = form.value.init_field_list
8682
.map((item: any) => {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ async function changeState(bool: Boolean, row: any) {
405405
} else {
406406
const res = await functionLibApi.getFunctionLibById(row.id, changeStateloading)
407407
if (!res.data.init_params && res.data.init_field_list && res.data.init_field_list.length > 0) {
408-
InitParamDrawerRef.value.open(res.data)
408+
InitParamDrawerRef.value.open(res.data, bool)
409409
row.is_active = false
410410
return
411411
}

0 commit comments

Comments
 (0)