进一步优化 合理拆分文件和优化

This commit is contained in:
Chen committed 2025-12-07 16:08:00 +08:00
1 parent ed76ec5da3
commit fa5bb66d14
30 files changed
+3007 -2363

No files matched your search

+4 -1
View File
@@ -107,11 +107,14 @@ export const useImageStore = create((set, get) => ({
// 重命名操作
setRenamingImage: (image) => set({ renamingImage: image }),
// 更新图片信息(重命名后)
// 更新图片信息(重命名、评分等)
updateImage: (oldPath, newData) => set((state) => ({
images: state.images.map(img =>
img.path === oldPath ? { ...img, ...newData } : img
),
originalImages: state.originalImages.map(img =>
img.path === oldPath ? { ...img, ...newData } : img
),
selectedImage: state.selectedImage?.path === oldPath
? { ...state.selectedImage, ...newData }
: state.selectedImage