Skip to content

Let's use AI to Earn!

fix: 日历调整

gaoSir590ad5fc2f7b
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index b9c35af7..097d1430 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,9 +6,8 @@
<component name="ChangeListManager">
<list default="true" id="90ed3383-49aa-4e32-95a2-9f070c0da49b" name="更改" comment="feat: 日历完善">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/index.tsx" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -79,7 +78,7 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1750677868216</updated>
- <workItem from="1750677869133" duration="4935000" />
+ <workItem from="1750677869133" duration="5461000" />
</task>
<task id="LOCAL-00001" summary="feat: 日历完善">
<option name="closed" value="true" />
@@ -89,7 +88,15 @@
<option name="project" value="LOCAL" />
<updated>1750681213106</updated>
</task>
- <option name="localTasksCounter" value="2" />
+ <task id="LOCAL-00002" summary="feat: 日历完善">
+ <option name="closed" value="true" />
+ <created>1750682966962</created>
+ <option name="number" value="00002" />
+ <option name="presentableId" value="LOCAL-00002" />
+ <option name="project" value="LOCAL" />
+ <updated>1750682966962</updated>
+ </task>
+ <option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
diff --git a/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss b/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss
index fb1447e8..01291bdc 100644
--- a/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss
+++ b/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss
@@ -45,6 +45,9 @@
display: none;
}
}
+ .fc-scroller {
+ overflow: hidden !important;
+ }
.calendarTiming-calendar {
position: relative;
overflow: auto;
diff --git a/src/app/[lng]/accounts/components/CalendarTiming/index.tsx b/src/app/[lng]/accounts/components/CalendarTiming/index.tsx
index dd447a54..ffa73d01 100644
--- a/src/app/[lng]/accounts/components/CalendarTiming/index.tsx
+++ b/src/app/[lng]/accounts/components/CalendarTiming/index.tsx
@@ -35,9 +35,11 @@ const CalendarTiming = memo(
setCurrentDate(date);
}
};
+ const calendarTimingCalendarRef = useRef<HTMLDivElement>(null);
// 动画触发函数
const triggerAnimation = (dir: "left" | "right" | "fade") => {
+ calendarTimingCalendarRef.current!.scrollTop = 0;
setDirection(dir);
setAnimating(true);
};
@@ -95,7 +97,10 @@ const CalendarTiming = memo(
classNames={getTransitionClassNames(direction)}
unmountOnExit
>
- <div className="calendarTiming-calendar">
+ <div
+ className="calendarTiming-calendar"
+ ref={calendarTimingCalendarRef}
+ >
<FullCalendar
ref={calendarRef}
locale={getFullCalendarLang(lng)}