| | |
| | | <div |
| | | class="w-max-[520px] border-2 rounded-lg border-solid border-gray-100 bg-white p-3 shadow-md relative hover:border-blue-500 group" |
| | | > |
| | | <Handle type="source" :position="Position.Left" /> |
| | | <Handle :id="handleId" type="target" :position="Position.Left" /> |
| | | |
| | | <div |
| | | class="group-hover:visible invisible flex absolute divide-y-[1.5px] divide-solid divide-gray-100 rounded-lg right-0 -top-0.5 translate-y-[-100%]" |
| | |
| | | <img src="/@/components/vue-flow/ui/assets/images/icon_End.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-else v-model="data.title" @blur="() => (titleIsEdit = false)"></el-input> |
| | | <el-input v-elInputFocus="false" v-else v-model="data.title" @blur="() => (titleIsEdit = false)"></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | |
| | | <!-- <div> |
| | | <Handle type="source" :position="Position.Left" /> |
| | | <Handle type="target" :position="Position.Left" /> |
| | | <span>结束</span> |
| | | </div> --> |
| | | </template> |
| | |
| | | import { Handle, Position, useNode, useVueFlow } from '@vue-flow/core'; |
| | | import { computed, ref } from 'vue'; |
| | | import { VueFlowConstant } from '../../VueFlowConstant'; |
| | | import { VueFlowHelper } from '../../VueFlowHelper'; |
| | | import { LLMNodeData, LLMNodeEvents } from './index'; |
| | | import { deepClone } from '/@/utils/other'; |
| | | |
| | | defineProps<NodeProps<LLMNodeData, LLMNodeEvents>>(); |
| | | |
| | | const node = useNode(); |
| | | const handleId = ref(VueFlowHelper.getHandleId(node.node, 'target')); |
| | | |
| | | const data = ref(node.node.data); |
| | | const titleIsEdit = ref(false); |
| | | const parameterTable = computed(() => data.value[VueFlowConstant.PARAMS_KEY]); |
| | | const parameterTable = computed(() => data.value[VueFlowConstant.GROUP_PARAMS_KEY]); |
| | | const { removeNodes, nodes, addNodes } = useVueFlow(); |
| | | |
| | | function handleClickDuplicateBtn() { |
| | | const { type, position, data } = node.node; |
| | | const newNode = { |
| | | id: (nodes.value.length + 1).toString(), |
| | | id: VueFlowHelper.genGeometryId(), |
| | | type, |
| | | position: { |
| | | x: position.x + 100, |