From b0290456bb8b74ff18a00dce3c165807b4774607 Mon Sep 17 00:00:00 2001 From: zheng020 Date: Thu, 11 Jun 2026 12:43:09 +0800 Subject: [PATCH] fix(square): use ref-binding for scrollTop reset; add bottom safety margin --- .../square/components/HotCategoryBlock.vue | 178 ++++++++++-------- frontend/pages/square/square.vue | 6 +- 2 files changed, 105 insertions(+), 79 deletions(-) diff --git a/frontend/pages/square/components/HotCategoryBlock.vue b/frontend/pages/square/components/HotCategoryBlock.vue index ae08c31..d6db8e8 100644 --- a/frontend/pages/square/components/HotCategoryBlock.vue +++ b/frontend/pages/square/components/HotCategoryBlock.vue @@ -24,96 +24,104 @@ - - - - - - - + + + + + + + + + + - - - - - + + - - - - - - - - - - - + v-for="(item, index) in items" + :key="item.id || index" + class="grid-card" + :class="{ + [`grid-card-top-${index + 1}`]: index < 5, + 'grid-card-top-other': index >= 5, + }" + @click="handleCardClick(item)" + > + @@ -305,11 +313,21 @@ onUnmounted(() => {