5656 v-model =" item.type"
5757 style =" max-width : 85px "
5858 class =" mr-8"
59- @change =" form_data.variable_list[index].value = null"
59+ @change =" (val: string) => {
60+ if (val === 'bool') {
61+ form_data.variable_list[index].value = true;
62+ } else {
63+ form_data.variable_list[index].value = null;
64+ }
65+ }"
6066 >
6167 <el-option v-for =" item in typeOptions" :key =" item" :label =" item" :value =" item" />
6268 </el-select >
122128 @submitDialog =" (val: string) => (form_data.variable_list[index].value = val)"
123129 />
124130 </el-form-item >
131+ <el-form-item
132+ v-else-if =" item.type === 'bool'"
133+ :prop =" 'variable_list.' + index + '.value'"
134+ :rules =" {
135+ message: $t('common.inputPlaceholder'),
136+ trigger: 'blur',
137+ required: true,
138+ }"
139+ >
140+ <el-select v-model =" item.value" style =" width : 155px " >
141+ <el-option label =" true" :value =" true" />
142+ <el-option label =" false" :value =" false" />
143+ </el-select >
144+ </el-form-item >
125145 </div >
126146 <el-form-item v-else >
127147 <NodeCascader
146166import { cloneDeep , set } from ' lodash'
147167import NodeContainer from ' @/workflow/common/NodeContainer.vue'
148168import NodeCascader from ' @/workflow/common/NodeCascader.vue'
149- import { computed , onMounted , ref } from ' vue'
169+ import { computed , nextTick , onMounted , ref } from ' vue'
150170import { isLastNode } from ' @/workflow/common/data'
151171import { randomId } from ' @/utils/common'
152172import { t } from ' @/locales'
153173
154174const props = defineProps <{ nodeModel: any }>()
155175
156- const typeOptions = [' string' , ' num' , ' json' ]
176+ const typeOptions = [' string' , ' num' , ' json' , ' bool ' ]
157177
158178const wheel = (e : any ) => {
159179 if (e .ctrlKey === true ) {
@@ -177,6 +197,7 @@ const form = {
177197 },
178198 ],
179199}
200+ const boolValue = ref (1 )
180201
181202const form_data = computed ({
182203 get : () => {
0 commit comments