fix: calendar button focus shadow, date range wrapping, calendar reload on view switch

- Remove FullCalendar button focus shadow to match matrix view buttons
- Allow date range text to wrap to 2 lines with smaller font
- Reload calendar data when switching back from matrix view

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-03 08:42:49 +08:00
parent ecdf15e26f
commit 80f4d4af46
+24 -4
View File
@@ -472,6 +472,14 @@ export default defineComponent({
viewMode.value = mode;
if (mode === 'calendar') {
isLandscape.value = false;
// 从矩阵切回日历时,按日历当前可视范围加载数据
const api = calendar.value?.getApi?.();
if (api) {
const view = api.view;
state.start_date = formatDate(view.activeStart, DateFormatter.Date);
state.end_date = formatDate(view.activeEnd, DateFormatter.Date);
search();
}
}
setKey('clazz_view_mode', mode);
if (mode === 'matrix') {
@@ -1131,6 +1139,15 @@ export default defineComponent({
flex-shrink: 0;
}
// 日历按钮与矩阵按钮一致,去掉焦点阴影
:deep(.fc .fc-button-primary:focus),
:deep(.fc .fc-button:focus) {
box-shadow: none !important;
}
:deep(.fc .fc-button-primary:not(:disabled).fc-button-active:focus) {
box-shadow: none !important;
}
:deep(.fc-view-harness) {
height: 100% !important;
min-height: 0;
@@ -1343,11 +1360,14 @@ export default defineComponent({
&__range {
min-width: 0;
font-size: 0.22rem;
font-size: 0.2rem;
color: #666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.3;
white-space: normal;
overflow: visible;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
&__nav {