🐛 修复主题切换首次显示并整理页面样式与类型

This commit is contained in:
2026-11-15 22:05:22 +08:00
parent 9d13e9aac2
commit 842c2653a7
3 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -58,12 +58,12 @@ function dateFormatToDate(date: Date | DataAnomaly) {
v-for="(article,index) of articles" :key="article.id"
class="border-l-2 border-l-old-neutral-400 dark:border-l-old-neutral-500 pl-4">
<div
v-if="currentChoice==='time' && (index == 0 || getYear(article) != getYear(articles[index-1]))"
v-if="currentChoice==='time' && (index == 0 || getYear(article) != getYear(articles[index-1]!))"
class="year-marker relative text-indigo-300 text-2xl pt-3 pb-3">
{{ getYear(article) }}
</div>
<div
v-else-if="currentChoice==='category' && (index == 0 || article.category != articles[index-1].category)"
v-else-if="currentChoice==='category' && (index == 0 || article.category != articles[index-1]!.category)"
class="year-marker relative text-indigo-300 text-2xl pt-3 pb-3">
{{ article.category }}
</div>
+5
View File
@@ -43,6 +43,7 @@ function revealToggle(e?: MouseEvent) {
</script>
<template>
<ClientOnly>
<Transition
mode="out-in"
enter-active-class="transition-opacity duration-300 ease-in-out"
@@ -67,6 +68,10 @@ function revealToggle(e?: MouseEvent) {
@click="revealToggle($event)"
/>
</Transition>
<template #fallback>
<span class="inline-block size-6 mr-5" />
</template>
</ClientOnly>
</template>
<style>