Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

style(photo-item): 修复容器宽高比错误

Timothy Yinefbcfb4252d1
diff --git a/app/components/masonry/PhotoItem.client.vue b/app/components/masonry/PhotoItem.client.vue
index 8024dd65..393b96cb 100644
--- a/app/components/masonry/PhotoItem.client.vue
+++ b/app/components/masonry/PhotoItem.client.vue
@@ -32,7 +32,7 @@ const aspectRatio = computed(() => {
if (props.photo.aspectRatio) {
return props.photo.aspectRatio
}
-
+
// Priority 2: Calculate from width and height if available
if (props.photo.width && props.photo.height) {
return props.photo.height / props.photo.width
@@ -202,7 +202,7 @@ onUnmounted(() => {
<!-- Container with fixed aspect ratio -->
<div
class="w-full relative"
- :style="{ aspectRatio: `1 / ${aspectRatio}` }"
+ :style="{ aspectRatio }"
>
<!-- Thumbhash placeholder -->
<div