bug fix: calcHeight
This commit is contained in:
parent
79c25ef7a7
commit
ecaad4e62a
@ -50,7 +50,16 @@ const props = defineProps<{
|
|||||||
|
|
||||||
return `${years} 年前`
|
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`
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -76,7 +85,7 @@ const props = defineProps<{
|
|||||||
<div
|
<div
|
||||||
v-if="commit.content"
|
v-if="commit.content"
|
||||||
class="ml-14 overflow-hidden transition-all duration-500 lg:invisible lg:opacity-0
|
class="ml-14 overflow-hidden transition-all duration-500 lg:invisible lg:opacity-0
|
||||||
lg:h-0 lg:group-hover:h-[999px] lg:group-hover:visible lg:group-hover:opacity-100"
|
lg:h-0 lg:group-hover:h-80 lg:group-hover:visible lg:group-hover:opacity-100"
|
||||||
:style="{ maxHeight: calcHeight(commit.content.Commits.length) }"
|
:style="{ maxHeight: calcHeight(commit.content.Commits.length) }"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
Loading…
x
Reference in New Issue
Block a user