This commit is contained in:
X1627315083@163.com
2026-03-02 10:51:17 +08:00
parent a865d189f3
commit 338c67d5b8
3 changed files with 11 additions and 1 deletions

View File

@@ -16,10 +16,18 @@ export const useProjectStore = defineStore('project', () => {
state.value.id = id
}
const clearProject = ()=>{
state.value = {
id: '',
nodeId: '',
}
}
return {
state,
setProject,
setId
setId,
clearProject
}
})

View File

@@ -39,6 +39,7 @@ const getVersionTree = ()=>{
versionTree({
projectId: projectStore.state.id
}).then(res => {
if(!res)return
setVersionsList([res])
})
}

View File

@@ -56,6 +56,7 @@
() => proJectId.value,
(newVal, oldVal) => {
if (newVal) {
projectStore.clearProject()
projectStore.setId(newVal)
}