From ecaad4e62a55015ab84e065bb8158c7e5eec890b Mon Sep 17 00:00:00 2001 From: Jeffrey Hsu Date: Tue, 14 Jan 2025 14:53:44 +0800 Subject: [PATCH] bug fix: calcHeight --- components/card/GitCard.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/components/card/GitCard.vue b/components/card/GitCard.vue index 3f2bb2d..9e69a5f 100644 --- a/components/card/GitCard.vue +++ b/components/card/GitCard.vue @@ -50,7 +50,16 @@ const props = defineProps<{ return `${years} 年前` }, - calcHeight = (n: number) => `${n * 2.5}rem` + calcHeight = (n: number) => { + /* + * Content: + * text-base: 1rem + * my-2: 1rem (0.5 + 0.5) + * Compare URL: + * text-base: 1rem + * */ + return `${2 * n + (n > 1 ? 2 : 0)}rem` + }