fix: 日历功能优化。

This commit is contained in:
tianyongbao
2026-01-08 12:13:12 +08:00
parent d973573564
commit 3f2a54af3d

View File

@@ -681,14 +681,14 @@ const handleSelectDate = (info) => {
} }
} }
// 日期单元格 // 日期单元格 - 优化高度和间距
.fc-daygrid-day { .fc-daygrid-day {
border: 1px solid #e8eaed; border: 1px solid #e8eaed;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
padding: 3px 4px; padding: 2px 3px;
background: #ffffff; background: #ffffff;
position: relative; position: relative;
min-height: 90px; min-height: 75px;
&:hover { &:hover {
background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%); background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
@@ -774,38 +774,32 @@ const handleSelectDate = (info) => {
margin-bottom: 2px; margin-bottom: 2px;
} }
// 事件样式 // 事件样式 - 紧凑清晰设计
.fc-event { .fc-event {
border: none; border: none !important;
border-radius: 5px; border-left: 2px solid #3b82f6 !important;
padding: 2px 8px; border-radius: 3px;
padding: 1px 6px;
margin: 1px 0; margin: 1px 0;
font-size: 12px; font-size: 12px;
font-weight: 600; font-weight: 500;
cursor: pointer; cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transition: all 0.2s ease;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); box-shadow: none;
line-height: 1.3; line-height: 1.4;
display: block; display: block;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
&::before { // 极淡背景色,保持空间利用率
content: ''; background: #eff6ff !important;
position: absolute; color: #1e40af !important;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: rgba(255, 255, 255, 0.5);
border-radius: 5px 0 0 5px;
}
&:hover { &:hover {
transform: translateY(-1px); background: #dbeafe !important;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); border-left-color: #2563eb !important;
} }
.fc-event-main { .fc-event-main {
@@ -813,6 +807,7 @@ const handleSelectDate = (info) => {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
color: #1e40af !important;
} }
.fc-event-title { .fc-event-title {
@@ -821,6 +816,7 @@ const handleSelectDate = (info) => {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
display: block; display: block;
color: #1e40af !important;
} }
} }
@@ -932,23 +928,25 @@ const handleSelectDate = (info) => {
} }
} }
// 自定义事件颜色类 // 自定义事件颜色类 - 紧凑样式
:deep(.plan_title) { :deep(.plan_title) {
display: block; display: block;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
padding-left: 4px; padding-left: 0;
color: #1e40af !important;
span { span {
font-size: 11px; font-size: 11px;
opacity: 0.95; opacity: 0.85;
margin-right: 3px; margin-right: 3px;
font-weight: 700; font-weight: 600;
background: rgba(255, 255, 255, 0.3); background: rgba(59, 130, 246, 0.12);
padding: 0px 4px; padding: 0px 4px;
border-radius: 2px; border-radius: 2px;
color: #2563eb;
} }
} }