mirror of
https://github.com/certd/certd.git
synced 2026-05-15 20:47:31 +08:00
fix: 修复复制流水线保存后丢失分组和排序号的问题
This commit is contained in:
@@ -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("切换项目成功");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user