Skip to content

修复图片页偏移问题 #52

Merged
merged 2 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 1.2.5 (2023-03-16)


### 🐛 Bug Fixes

* **custom**: 修复跳转到图片页面时页面偏移问题 ([6582a13](https://vlink.dev/EOEFANS/eoefans-web/commits/6582a13))



## 1.2.4 (2023-03-16)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eoefans-web",
"version": "1.2.4",
"version": "1.2.5",
"type": "module",
"scripts": {
"dev": "vite --config ./config/vite.dev.config.ts",
Expand Down
43 changes: 20 additions & 23 deletions src/routers/photo/masonry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,38 +80,35 @@ export default function Masonry(props: PhotoRouterMasonryType) {

return (
<div className={styles["container"]}>
<Fade in={!isLoading} className={`${!isLoading ? "" : "hidden"}`}>
<div>
{!isLoading && (
{isLoading ? (
<Fade in={isLoading}>
<div>
<Masonic_masonry
items={lists}
items={loadingLists}
maxColumnCount={5}
{...minCount}
columnGutter={md ? 5 : 10}
rowGutter={md ? 5 : 10}
columnWidth={200}
render={PhotoCard}
render={PhotoLoadingItem}
overscanBy={Infinity}
className={styles["container"]}
/>
)}
</div>
</Fade>
<Fade in={isLoading} className={`${isLoading ? "" : "hidden"}`}>
<div>
<Masonic_masonry
items={loadingLists}
maxColumnCount={5}
{...minCount}
columnGutter={md ? 5 : 10}
rowGutter={md ? 5 : 10}
columnWidth={200}
render={PhotoLoadingItem}
overscanBy={Infinity}
className={styles["container"]}
/>
</div>
</Fade>
</div>
</Fade>
) : (
<Masonic_masonry
items={lists}
maxColumnCount={5}
{...minCount}
columnGutter={md ? 5 : 10}
rowGutter={md ? 5 : 10}
columnWidth={200}
render={PhotoCard}
overscanBy={Infinity}
className={styles["container"]}
/>
)}
</div>
);
}