This commit is contained in:
2026-02-25 10:20:53 +08:00
5 changed files with 61 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
<script lang="ts" setup>
import { Handle, Position } from '@vue-flow/core'
import { ref } from 'vue'
const props = defineProps<{
data: {
type: Object,
default: () => ({
id: '',
})
}
}>()
</script>
<template>
<div class="node start">
<Handle type="source" style="top: 40px;" id="Right" :position="Position.Right" />
<div class="item">
<slot name="content"></slot>
</div>
</div>
</template>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,33 @@
<script lang="ts" setup>
import { Handle, Position } from '@vue-flow/core'
import { ref } from 'vue'
const props = defineProps<{
data: {
type: Object,
default: () => ({
id: '',
})
},
}>()
</script>
<!-- source输入target输出 -->
<template>
<div class="node">
<Handle type="target" style="top: 40px;" id="Left" :position="Position.Left" />
<Handle type="source" style="top: 40px;" id="Right" :position="Position.Right" />
<!-- <Handle type="source" id="Right" :position="Position.Right" />
<Handle type="target" id="Left" :position="Position.Left" /> -->
<!-- <div>{{ props.data.id }}</div> -->
<div class="item">
<slot name="content"></slot>
</div>
</div>
</template>
<style lang="less" scoped>
.node{
.item{
}
}
</style>

View File

@@ -3,7 +3,7 @@ import { ref, onMounted, onUnmounted, reactive, toRefs, watch } from 'vue'
import Tree from './tree/index.vue'
import Detail from './detail/index.vue'
// import { versionsList } from './tools/versionsData'
import { findAndAddChild, findAndRemoveChild } from './tools/tools'
import { findAndAddChild, findAndRemoveChild } from '../../../../../utils/treeDiagram'
import { useProjectStore } from '@/stores'
import { versionTree, getChatNodeDetail } from '@/api/versitonTree'

View File

@@ -5,7 +5,7 @@ import { VueFlow, useVueFlow } from '@vue-flow/core'
import SpecialEdge from './speciaiEdge.vue'
import InputNode from './InputNode.vue'//主
import SecondaryNode from './secondaryNode.vue'//分支
import { useLayout } from '../../tools/tools'
import { useLayout } from '@/utils/treeDiagram'
import dialogVue from "../../components/dialog.vue";
const props = defineProps({
selectItem: {