fix
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ const getVersionTree = ()=>{
|
||||
versionTree({
|
||||
projectId: projectStore.state.id
|
||||
}).then(res => {
|
||||
if(!res)return
|
||||
setVersionsList([res])
|
||||
})
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
() => proJectId.value,
|
||||
(newVal, oldVal) => {
|
||||
if (newVal) {
|
||||
projectStore.clearProject()
|
||||
projectStore.setId(newVal)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user