This commit is contained in:
X1627315083@163.com
2026-02-26 10:19:51 +08:00
parent 8ebaa46211
commit ccc6d2cb7b
9 changed files with 123 additions and 26 deletions

View File

@@ -1,11 +1,17 @@
<script setup lang="ts">
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
import { ref, onMounted, onUnmounted, reactive, watch } from "vue";
import VersionDetail from './versionDetail.vue'
import ChatDetail from './chatDetail.vue'
import { useProjectStore } from '@/stores'
import { getChatNodeDetail, getNodeAncestors } from '@/api/versitonTree'
//const props = defineProps({
//})
const emit = defineEmits([
])
const projectStore = useProjectStore()
const detailData = ref({
id:1,
versionDetail:{
@@ -17,9 +23,25 @@ const detailData = ref({
userChatDetail:{
}
})
watch(()=>projectStore.state.nodeId, (newVal, oldVal) => {
console.log(newVal)
if(newVal){
getChatNodeDetail({
projectId: projectStore.state.id,
id: newVal
}).then(res => {
console.log(res)
})
getNodeAncestors({
projectId: projectStore.state.id,
id: newVal
}).then(res => {
console.log(res)
})
}
},{ immediate: true })
onMounted(()=>{
})
onUnmounted(()=>{