fix
This commit is contained in:
@@ -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(()=>{
|
||||
|
||||
Reference in New Issue
Block a user