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:
@@ -472,6 +472,14 @@ export default defineComponent({
|
|||||||
viewMode.value = mode;
|
viewMode.value = mode;
|
||||||
if (mode === 'calendar') {
|
if (mode === 'calendar') {
|
||||||
isLandscape.value = false;
|
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);
|
setKey('clazz_view_mode', mode);
|
||||||
if (mode === 'matrix') {
|
if (mode === 'matrix') {
|
||||||
@@ -1131,6 +1139,15 @@ export default defineComponent({
|
|||||||
flex-shrink: 0;
|
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) {
|
:deep(.fc-view-harness) {
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
@@ -1343,11 +1360,14 @@ export default defineComponent({
|
|||||||
|
|
||||||
&__range {
|
&__range {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
font-size: 0.22rem;
|
font-size: 0.2rem;
|
||||||
color: #666;
|
color: #666;
|
||||||
white-space: nowrap;
|
line-height: 1.3;
|
||||||
overflow: hidden;
|
white-space: normal;
|
||||||
text-overflow: ellipsis;
|
overflow: visible;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__nav {
|
&__nav {
|
||||||
|
|||||||
Reference in New Issue
Block a user