画布添加功能和选择节点变为选中后就可以添加,添加逻辑和生成多张逻辑一致,

This commit is contained in:
X1627315083@163.com
2026-03-23 14:23:30 +08:00
parent 21a0acfff9
commit c7b62fdf88
7 changed files with 85 additions and 75 deletions

View File

@@ -58,6 +58,9 @@ const setVersionsList = (res)=>{
}
traverseArray(res,'',(item,i,father)=>{
item.versionId = father?`${father.versionId}-${i+1}`:'1'
if(item.id == projectStore.state.nodeId){
selectItem.value = {...item}
}
})
versionsList.value = res
}
@@ -110,10 +113,6 @@ const versionDelete = (versionDetail)=>{
treeKey.value++
}
watch(()=>projectStore.state.nodeId,(newVal,oldVal)=>{
if(!newVal || newVal === selectItem?.value?.id)return
selectItem.value = {id:newVal}
})
let data = reactive({})
// onMounted(() => {setVersionsList('')})