From d23c8b4a2a5f5ab17822c6ee1d4108ac7280b9d1 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Sun, 8 Mar 2026 01:53:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=A8=A1=E5=BC=8F=E4=B8=8B=EF=BC=8C=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/certd-client/src/store/project/index.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/ui/certd-client/src/store/project/index.ts b/packages/ui/certd-client/src/store/project/index.ts index 09c1bb967..1122c9b9c 100644 --- a/packages/ui/certd-client/src/store/project/index.ts +++ b/packages/ui/certd-client/src/store/project/index.ts @@ -15,11 +15,18 @@ export type ProjectItem = { export const useProjectStore = defineStore("app.project", () => { const myProjects = ref([]); const inited = ref(false); + const currentProjectId = ref(); // 直接调用 + + function $reset() { + myProjects.value = []; + currentProjectId.value = ""; + inited.value = false; + } const userStore = useUserStore(); const userId = userStore.getUserInfo?.id; const lastProjectIdCacheKey = "currentProjectId:" + userId; const lastProjectId = LocalStorage.get(lastProjectIdCacheKey); - const currentProjectId = ref(lastProjectId); // 直接调用 + currentProjectId.value = lastProjectId; const projects = computed(() => { return myProjects.value; @@ -118,11 +125,6 @@ export const useProjectStore = defineStore("app.project", () => { return false; } - function $reset() { - myProjects.value = []; - currentProjectId.value = ""; - } - return { projects, myProjects,