顶部项目列表联动中间表格刷新

This commit is contained in:
Teo
2025-03-25 10:52:02 +08:00
parent d9c81eb37a
commit 29eeab48b8
4 changed files with 28 additions and 2 deletions

View File

@ -37,10 +37,17 @@ watch(
);
const handleSelect = (projectId: string) => {
const oldId = userStore.getSelectedProjectFromStorage()
console.log(projectId,oldId.id);
if (projectId!=oldId.id) {
location.reload()
}
const selectedProject = projects.value.find((p) => p.id === projectId);
if (selectedProject) {
userStore.setSelectedProject(selectedProject);
}
};
</script>