🚧 developing

This commit is contained in:
2025-02-24 00:36:54 +08:00
parent c7288b2cb4
commit 5befcddaf5
37 changed files with 783 additions and 127 deletions

View File

@@ -18,6 +18,13 @@ export const useImageStore = defineStore(
"gif": "动图",
"screenshot": "截图",
});
// 清算模式切换
const switchValue = ref<boolean>(false);
// 相册分享弹窗相关
const openAlbumShareDialog = ref<boolean>(false);
const albumShareCoverImage = ref<string>("");
const albumShareId = ref<number>(0);
/**
* 统计图片总数
@@ -31,13 +38,24 @@ export const useImageStore = defineStore(
return imageList.reduce((total, record) => total + record.list.length, 0);
}
function openAlbumShareDialogHandler(value: boolean, coverImage: string, albumId: number) {
openAlbumShareDialog.value = value;
albumShareCoverImage.value = coverImage;
albumShareId.value = albumId;
}
return {
selected,
tabActiveKey,
tabMap,
homeTabMap,
switchValue,
homeTabActiveKey,
countTotalImages
albumShareCoverImage,
albumShareId,
countTotalImages,
openAlbumShareDialog,
openAlbumShareDialogHandler,
};
},
{
@@ -46,7 +64,7 @@ export const useImageStore = defineStore(
persist: true,
storage: localStorage,
key: 'image',
includePaths: ["tabActiveKey", "tabMap", "homeTabActiveKey", "homeTabMap"],
includePaths: ["tabActiveKey", "tabMap", "homeTabActiveKey", "homeTabMap", "switchValue"],
}
}
);

View File

@@ -15,7 +15,6 @@ interface UploadPredictResult {
thumb_size: number | null;
}
export const useUploadStore = defineStore(
'upload',
() => {
@@ -38,6 +37,8 @@ export const useUploadStore = defineStore(
const storageSelected = ref<any[]>([]);
const albumSelected = ref<number>();
/**
* 打开上传抽屉
*/
@@ -70,6 +71,7 @@ export const useUploadStore = defineStore(
storageSelected,
openUploadDrawerFn,
clearPredictResult,
albumSelected,
};
},
{
@@ -78,7 +80,7 @@ export const useUploadStore = defineStore(
persist: true,
storage: localStorage,
key: 'upload',
includePaths: ["storageSelected"]
includePaths: ["storageSelected", "albumSelected"]
}
}
);