fix(web): 派车日历在日期旁显示红色星期。
手工日历和普通日历都能直接看出当天是星期几。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f9d031bacb
commit
d333e97bec
3 files changed
+20
-3
No files matched your search
@@ -84,6 +84,7 @@
|
||||
<div class="manual-day-heading">
|
||||
<div class="manual-day-title">
|
||||
<strong>{{ Number(day.date.slice(-2)) }}</strong>
|
||||
<span class="manual-day-weekday">{{ weekdayLabel(day.date) }}</span>
|
||||
</div>
|
||||
<div v-if="day.inMonth" class="manual-day-actions">
|
||||
<el-button
|
||||
@@ -301,6 +302,11 @@
|
||||
} = useManualCalendar(undefined, props.calendarKind)
|
||||
const calendarEl = ref<HTMLElement>()
|
||||
const weekdays = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
|
||||
function weekdayLabel(date: string) {
|
||||
return ['周日', '周一', '周二', '周三', '周四', '周五', '周六'][
|
||||
new Date(`${date}T12:00:00`).getDay()
|
||||
]
|
||||
}
|
||||
const viewRow = ref<DispatchCalendarRecord>()
|
||||
const viewOpen = computed({
|
||||
get: () => !!viewRow.value,
|
||||
|
||||
@@ -321,14 +321,15 @@
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.day-weekday,
|
||||
.empty-day {
|
||||
.day-weekday {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
.empty-day {
|
||||
padding: 6px 0;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.day-content {
|
||||
|
||||
@@ -181,6 +181,16 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.manual-day-weekday {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
.manual-day.outside .manual-day-weekday {
|
||||
color: #fca5a5;
|
||||
}
|
||||
|
||||
.manual-day-actions {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
|
||||
Reference in new issue
Block a user