fix: 修复复制流水线保存后丢失分组和排序号的问题

This commit is contained in:
xiaojunnuo
2026-02-28 19:29:13 +08:00
parent ea5e7d9563
commit bc326489ab
7 changed files with 36 additions and 9 deletions
@@ -17,7 +17,8 @@ export const useProjectStore = defineStore("app.project", () => {
const inited = ref(false);
const userStore = useUserStore();
const userId = userStore.getUserInfo?.id;
const lastProjectId = LocalStorage.get("currentProjectId:" + userId);
const lastProjectIdCacheKey = "currentProjectId:" + userId;
const lastProjectId = LocalStorage.get(lastProjectIdCacheKey);
const currentProjectId = ref(lastProjectId); // 直接调用
const projects = computed(() => {
@@ -63,7 +64,7 @@ export const useProjectStore = defineStore("app.project", () => {
function changeCurrentProject(id: string, silent?: boolean) {
currentProjectId.value = id;
LocalStorage.set("currentProjectId", id);
LocalStorage.set(lastProjectIdCacheKey, id);
if (!silent) {
message.success("切换项目成功");
}