From af64f7eab7d9247d93e455fd49aef600dcb3a123 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 9 Sep 2025 18:38:26 +0800 Subject: [PATCH] feat: enhance variable selection to support boolean type --- .../nodes/variable-assign-node/index.vue | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index 5052fea4a..475c2560d 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -56,7 +56,13 @@ v-model="item.type" style="max-width: 85px" class="mr-8" - @change="form_data.variable_list[index].value = null" + @change="(val: string) => { + if (val === 'bool') { + form_data.variable_list[index].value = true; + } else { + form_data.variable_list[index].value = null; + } + }" > @@ -122,6 +128,20 @@ @submitDialog="(val: string) => (form_data.variable_list[index].value = val)" /> + + + + + + () -const typeOptions = ['string', 'num', 'json'] +const typeOptions = ['string', 'num', 'json', 'bool'] const wheel = (e: any) => { if (e.ctrlKey === true) { @@ -177,6 +197,7 @@ const form = { }, ], } +const boolValue = ref(1) const form_data = computed({ get: () => {