| | |
| | | <img src="/@/components/vue-flow/ui/assets/images/icon_Start.png" class="h-4 w-4" alt="Start icon" /> |
| | | <div class="flex flex-col gap-y-1"> |
| | | <p v-if="!titleIsEdit" class="text-xl font-bold text-gray-500" @click="titleIsEdit = true">{{ data.title }}</p> |
| | | <el-input v-elInputFocus v-else v-model="data.title" @blur="() => (titleIsEdit = false)"></el-input> |
| | | <el-input v-elInputFocus="true" v-else v-model="data.title" @blur="() => (titleIsEdit = false)"></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <div class="flex-column gap-y-2"> |
| | | <div v-for="(subItem, subIndex) in item.conditions" class="ml-5 flex-items-center gap-x-2 group/conditionItem"> |
| | | <el-input |
| | | filterable |
| | | class="w-[120px] flex-0" |
| | | v-model="subItem.left_value" |
| | | |
| | | placeholder="输入变量" |
| | | > |
| | | </el-input> |
| | | <el-input filterable class="w-[120px] flex-0" v-model="subItem.left_value" placeholder="输入变量"> </el-input> |
| | | <el-select v-model="subItem.comparison_operation" class="flex-0 w-[120px]" placeholder="选择条件"> |
| | | <el-option |
| | | v-for="item in Object.keys(compareOperationMap)" |
| | |
| | | import { computed } from 'vue'; |
| | | import { VueFlowConstant } from '../../VueFlowConstant'; |
| | | import { ConditionHelper, VueFlowHelper } from '../../VueFlowHelper'; |
| | | import { compareOperationMap, VarType, conditionOperatorMap, varTypeMap } from '../../vueFlowEnum'; |
| | | import { VarType, compareOperationMap, conditionOperatorMap, varTypeMap } from '../../vueFlowEnum'; |
| | | import { LLMNodeData, LLMNodeEvents } from './index'; |
| | | import { deepClone } from '/@/utils/other'; |
| | | defineProps<NodeProps<LLMNodeData, LLMNodeEvents>>(); |
| | |
| | | groupName: item?.data.title ?? item?.label, |
| | | options: [], |
| | | }; |
| | | const varList = VueFlowHelper.getFieldValue(item.data,'var_list'); |
| | | const varList = VueFlowHelper.getFieldValue(item.data, 'var_list'); |
| | | if (varList) { |
| | | varList |
| | | .filter((item: any) => Boolean(item.name)) |
| | |
| | | }); |
| | | |
| | | const data = ref(node.node.data); |
| | | const conditionGroupList = ref(VueFlowHelper.getFieldValue(data.value,'condition')); |
| | | const conditionGroupList = ref(VueFlowHelper.getFieldValue(data.value, 'condition')); |
| | | const titleIsEdit = ref(false); |
| | | |
| | | function handleClickAddBtn() { |