diff --git a/src/components/ExpanderComponent.vue b/src/components/ExpanderComponent.vue index 8d814c5..497debd 100644 --- a/src/components/ExpanderComponent.vue +++ b/src/components/ExpanderComponent.vue @@ -22,6 +22,7 @@ onMounted(() => { watch(content, (newSize) => { if (!collapsed.value) contentWrapperRef.value!.style.height = `${newSize}px` + console.log(newSize) }) content.value = contentDesiredSizeWrapperRef.value!.scrollHeight @@ -47,6 +48,7 @@ onMounted(() => { border-unset bg-transparent cursor-pointer + flex="~ items-center justify-center" > { -
+
diff --git a/src/components/SidebarComponent.vue b/src/components/SidebarComponent.vue index 3ebe9fb..486181c 100644 --- a/src/components/SidebarComponent.vue +++ b/src/components/SidebarComponent.vue @@ -7,6 +7,7 @@ import rawActivityList from 'virtual:activity-list.json' import rawNewsList from 'virtual:news-list.json' import type { PageData } from '@/data/pagedata' import { groupByYearMonth } from '@/utils' +import ExpanderComponent from './ExpanderComponent.vue' const activityListGrouped = groupByYearMonth(rawActivityList as PageData[]) const newsListGrouped = groupByYearMonth(rawNewsList as PageData[]) @@ -64,73 +65,82 @@ defineExpose({ toggleSidebar }) LCPU -

- 活动 -

- -
-
- {{ activityGroup.year }} 年 {{ activityGroup.month }} 月 - - - {{ activity.title }} + +
+
+ {{ activityGroup.year }} 年 {{ activityGroup.month }} 月 + + + {{ activity.title }} +
-
+ -

- 新闻 -

-
-
- {{ newsGroup.year }} 年 {{ newsGroup.month }} 月 - - {{ news.title }} + +
+
+ {{ newsGroup.year }} 年 {{ newsGroup.month }} 月 + + {{ news.title }} +
-
+